]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/tree-ssa.h
[testsuite] Add missing dg-require-effective-target label_values
[thirdparty/gcc.git] / gcc / tree-ssa.h
CommitLineData
69ee5dbb 1/* Header file for any pass which requires SSA routines.
fbd26352 2 Copyright (C) 2013-2019 Free Software Foundation, Inc.
69ee5dbb 3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
15
16You should have received a copy of the GNU General Public License
17along 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
69ee5dbb 23/* Mapping for redirected edges. */
6dc50383 24struct edge_var_map {
69ee5dbb 25 tree result; /* PHI result. */
26 tree def; /* PHI arg definition. */
be1e7283 27 location_t locus; /* PHI arg location. */
69ee5dbb 28};
69ee5dbb 29
30/* A vector of var maps. */
31typedef vec<edge_var_map, va_heap, vl_embed> edge_var_map_vector;
32
33
be1e7283 34extern void redirect_edge_var_map_add (edge, tree, tree, location_t);
69ee5dbb 35extern void redirect_edge_var_map_clear (edge);
36extern void redirect_edge_var_map_dup (edge, edge);
06ecf488 37extern vec<edge_var_map> *redirect_edge_var_map_vector (edge);
b1090780 38extern void redirect_edge_var_map_empty (void);
69ee5dbb 39extern edge ssa_redirect_edge (edge, basic_block);
40extern void flush_pending_stmts (edge);
42acab1c 41extern void gimple_replace_ssa_lhs (gimple *, tree);
69ee5dbb 42extern tree target_for_debug_bind (tree);
43extern void insert_debug_temp_for_var_def (gimple_stmt_iterator *, tree);
44extern void insert_debug_temps_for_defs (gimple_stmt_iterator *);
42acab1c 45extern void reset_debug_uses (gimple *);
69ee5dbb 46extern void release_defs_bitset (bitmap toremove);
71b65939 47extern void verify_ssa (bool, bool);
d4f078b5 48extern void init_tree_ssa (function *);
49extern void delete_tree_ssa (function *);
69ee5dbb 50extern bool tree_ssa_useless_type_conversion (tree);
51extern tree tree_ssa_strip_useless_type_conversions (tree);
52
44841cf7 53
54extern bool ssa_defined_default_def_p (tree t);
4d8d655b 55extern bool ssa_undefined_value_p (tree, bool = true);
4883b250 56extern bool gimple_uses_undefined_value_p (gimple *);
69ee5dbb 57extern void execute_update_addresses_taken (void);
58
59/* Given an edge_var_map V, return the PHI arg definition. */
60
61static inline tree
62redirect_edge_var_map_def (edge_var_map *v)
63{
64 return v->def;
65}
66
67/* Given an edge_var_map V, return the PHI result. */
68
69static inline tree
70redirect_edge_var_map_result (edge_var_map *v)
71{
72 return v->result;
73}
74
75/* Given an edge_var_map V, return the PHI arg location. */
76
be1e7283 77static inline location_t
69ee5dbb 78redirect_edge_var_map_location (edge_var_map *v)
79{
80 return v->locus;
81}
82
382ecba7 83/* Verify SSA invariants, if internal consistency checks are enabled. */
84
85static inline void
86checking_verify_ssa (bool check_modified_stmt, bool check_ssa_operands)
87{
88 if (flag_checking)
89 verify_ssa (check_modified_stmt, check_ssa_operands);
90}
69ee5dbb 91
92#endif /* GCC_TREE_SSA_H */