GCC Middle and Back End API Reference
tree-ssa.h
Go to the documentation of this file.
1 /* Header file for any pass which requires SSA routines.
2  Copyright (C) 2013 Free Software Foundation, Inc.
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 
23 /* Mapping for redirected edges. */
24 struct _edge_var_map {
25  tree result; /* PHI result. */
26  tree def; /* PHI arg definition. */
27  source_location locus; /* PHI arg location. */
28 };
29 typedef struct _edge_var_map edge_var_map;
30 
31 /* A vector of var maps. */
33 
34 
35 extern void redirect_edge_var_map_add (edge, tree, tree, source_location);
36 extern void redirect_edge_var_map_clear (edge);
37 extern void redirect_edge_var_map_dup (edge, edge);
39 extern void redirect_edge_var_map_destroy (void);
41 extern void flush_pending_stmts (edge);
42 extern void count_uses_and_derefs (tree, gimple, unsigned *, unsigned *,
43  unsigned *);
44 extern void gimple_replace_ssa_lhs (gimple, tree);
48 extern void reset_debug_uses (gimple);
49 extern void release_defs_bitset (bitmap toremove);
50 extern void verify_ssa (bool);
51 extern void init_tree_ssa (struct function *);
52 extern void delete_tree_ssa (void);
55 
56 extern bool ssa_undefined_value_p (tree);
57 extern void execute_update_addresses_taken (void);
58 
59 /* Given an edge_var_map V, return the PHI arg definition. */
60 
61 static inline tree
63 {
64  return v->def;
65 }
66 
67 /* Given an edge_var_map V, return the PHI result. */
68 
69 static inline tree
71 {
72  return v->result;
73 }
74 
75 /* Given an edge_var_map V, return the PHI arg location. */
76 
77 static inline source_location
79 {
80  return v->locus;
81 }
82 
83 
84 #endif /* GCC_TREE_SSA_H */