]>
Commit | Line | Data |
---|---|---|
7a300452 | 1 | /* Header file for any pass which requires SSA routines. |
5624e564 | 2 | Copyright (C) 2013-2015 Free Software Foundation, Inc. |
7a300452 AM |
3 | |
4 | This file is part of GCC. | |
5 | ||
6 | GCC is free software; you can redistribute it and/or modify it under | |
7 | the terms of the GNU General Public License as published by the Free | |
8 | Software Foundation; either version 3, or (at your option) any later | |
9 | version. | |
10 | ||
11 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
12 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 | for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GCC; see the file COPYING3. If not see | |
18 | <http://www.gnu.org/licenses/>. */ | |
19 | ||
20 | #ifndef GCC_TREE_SSA_H | |
21 | #define GCC_TREE_SSA_H | |
22 | ||
7a300452 | 23 | /* Mapping for redirected edges. */ |
a79683d5 | 24 | struct edge_var_map { |
7a300452 AM |
25 | tree result; /* PHI result. */ |
26 | tree def; /* PHI arg definition. */ | |
27 | source_location locus; /* PHI arg location. */ | |
28 | }; | |
7a300452 AM |
29 | |
30 | /* A vector of var maps. */ | |
31 | typedef vec<edge_var_map, va_heap, vl_embed> edge_var_map_vector; | |
32 | ||
33 | ||
34 | extern void redirect_edge_var_map_add (edge, tree, tree, source_location); | |
35 | extern void redirect_edge_var_map_clear (edge); | |
36 | extern void redirect_edge_var_map_dup (edge, edge); | |
b787e7a2 | 37 | extern vec<edge_var_map> *redirect_edge_var_map_vector (edge); |
7a300452 AM |
38 | extern void redirect_edge_var_map_destroy (void); |
39 | extern edge ssa_redirect_edge (edge, basic_block); | |
40 | extern void flush_pending_stmts (edge); | |
355fe088 | 41 | extern void gimple_replace_ssa_lhs (gimple *, tree); |
7a300452 AM |
42 | extern tree target_for_debug_bind (tree); |
43 | extern void insert_debug_temp_for_var_def (gimple_stmt_iterator *, tree); | |
44 | extern void insert_debug_temps_for_defs (gimple_stmt_iterator *); | |
355fe088 | 45 | extern void reset_debug_uses (gimple *); |
7a300452 | 46 | extern void release_defs_bitset (bitmap toremove); |
e9ff9caf | 47 | extern void verify_ssa (bool, bool); |
61183076 RB |
48 | extern void init_tree_ssa (function *); |
49 | extern void delete_tree_ssa (function *); | |
7a300452 AM |
50 | extern bool tree_ssa_useless_type_conversion (tree); |
51 | extern tree tree_ssa_strip_useless_type_conversions (tree); | |
52 | ||
956623c1 | 53 | extern bool ssa_undefined_value_p (tree, bool = true); |
828ca3d8 | 54 | extern bool gimple_uses_undefined_value_p (gimple *); |
7a300452 AM |
55 | extern void execute_update_addresses_taken (void); |
56 | ||
57 | /* Given an edge_var_map V, return the PHI arg definition. */ | |
58 | ||
59 | static inline tree | |
60 | redirect_edge_var_map_def (edge_var_map *v) | |
61 | { | |
62 | return v->def; | |
63 | } | |
64 | ||
65 | /* Given an edge_var_map V, return the PHI result. */ | |
66 | ||
67 | static inline tree | |
68 | redirect_edge_var_map_result (edge_var_map *v) | |
69 | { | |
70 | return v->result; | |
71 | } | |
72 | ||
73 | /* Given an edge_var_map V, return the PHI arg location. */ | |
74 | ||
75 | static inline source_location | |
76 | redirect_edge_var_map_location (edge_var_map *v) | |
77 | { | |
78 | return v->locus; | |
79 | } | |
80 | ||
b2b29377 MM |
81 | /* Verify SSA invariants, if internal consistency checks are enabled. */ |
82 | ||
83 | static inline void | |
84 | checking_verify_ssa (bool check_modified_stmt, bool check_ssa_operands) | |
85 | { | |
86 | if (flag_checking) | |
87 | verify_ssa (check_modified_stmt, check_ssa_operands); | |
88 | } | |
7a300452 AM |
89 | |
90 | #endif /* GCC_TREE_SSA_H */ |