annotate gcc/tree-ssa.h @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Header file for any pass which requires SSA routines.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 2013-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
9 version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
14 for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 #ifndef GCC_TREE_SSA_H
kono
parents:
diff changeset
21 #define GCC_TREE_SSA_H
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 /* Mapping for redirected edges. */
kono
parents:
diff changeset
24 struct edge_var_map {
kono
parents:
diff changeset
25 tree result; /* PHI result. */
kono
parents:
diff changeset
26 tree def; /* PHI arg definition. */
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
27 location_t locus; /* PHI arg location. */
111
kono
parents:
diff changeset
28 };
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 /* A vector of var maps. */
kono
parents:
diff changeset
31 typedef vec<edge_var_map, va_heap, vl_embed> edge_var_map_vector;
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
34 extern void redirect_edge_var_map_add (edge, tree, tree, location_t);
111
kono
parents:
diff changeset
35 extern void redirect_edge_var_map_clear (edge);
kono
parents:
diff changeset
36 extern void redirect_edge_var_map_dup (edge, edge);
kono
parents:
diff changeset
37 extern vec<edge_var_map> *redirect_edge_var_map_vector (edge);
kono
parents:
diff changeset
38 extern void redirect_edge_var_map_empty (void);
kono
parents:
diff changeset
39 extern edge ssa_redirect_edge (edge, basic_block);
kono
parents:
diff changeset
40 extern void flush_pending_stmts (edge);
kono
parents:
diff changeset
41 extern void gimple_replace_ssa_lhs (gimple *, tree);
kono
parents:
diff changeset
42 extern tree target_for_debug_bind (tree);
kono
parents:
diff changeset
43 extern void insert_debug_temp_for_var_def (gimple_stmt_iterator *, tree);
kono
parents:
diff changeset
44 extern void insert_debug_temps_for_defs (gimple_stmt_iterator *);
kono
parents:
diff changeset
45 extern void reset_debug_uses (gimple *);
kono
parents:
diff changeset
46 extern void release_defs_bitset (bitmap toremove);
kono
parents:
diff changeset
47 extern void verify_ssa (bool, bool);
kono
parents:
diff changeset
48 extern void init_tree_ssa (function *);
kono
parents:
diff changeset
49 extern void delete_tree_ssa (function *);
kono
parents:
diff changeset
50 extern bool tree_ssa_useless_type_conversion (tree);
kono
parents:
diff changeset
51 extern tree tree_ssa_strip_useless_type_conversions (tree);
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 extern bool ssa_defined_default_def_p (tree t);
kono
parents:
diff changeset
55 extern bool ssa_undefined_value_p (tree, bool = true);
kono
parents:
diff changeset
56 extern bool gimple_uses_undefined_value_p (gimple *);
kono
parents:
diff changeset
57 extern void execute_update_addresses_taken (void);
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 /* Given an edge_var_map V, return the PHI arg definition. */
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 static inline tree
kono
parents:
diff changeset
62 redirect_edge_var_map_def (edge_var_map *v)
kono
parents:
diff changeset
63 {
kono
parents:
diff changeset
64 return v->def;
kono
parents:
diff changeset
65 }
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 /* Given an edge_var_map V, return the PHI result. */
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 static inline tree
kono
parents:
diff changeset
70 redirect_edge_var_map_result (edge_var_map *v)
kono
parents:
diff changeset
71 {
kono
parents:
diff changeset
72 return v->result;
kono
parents:
diff changeset
73 }
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 /* Given an edge_var_map V, return the PHI arg location. */
kono
parents:
diff changeset
76
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
77 static inline location_t
111
kono
parents:
diff changeset
78 redirect_edge_var_map_location (edge_var_map *v)
kono
parents:
diff changeset
79 {
kono
parents:
diff changeset
80 return v->locus;
kono
parents:
diff changeset
81 }
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83 /* Verify SSA invariants, if internal consistency checks are enabled. */
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 static inline void
kono
parents:
diff changeset
86 checking_verify_ssa (bool check_modified_stmt, bool check_ssa_operands)
kono
parents:
diff changeset
87 {
kono
parents:
diff changeset
88 if (flag_checking)
kono
parents:
diff changeset
89 verify_ssa (check_modified_stmt, check_ssa_operands);
kono
parents:
diff changeset
90 }
kono
parents:
diff changeset
91
kono
parents:
diff changeset
92 #endif /* GCC_TREE_SSA_H */