]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/tree-ssa.h
* tree-ssa.h: Don't include gimple-low.h, tree-ssa-address.h, sbitmap.h,
[thirdparty/gcc.git] / gcc / tree-ssa.h
CommitLineData
69ee5dbb 1/* Header file for any pass which requires SSA routines.
2 Copyright (C) 2013 Free Software Foundation, Inc.
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
dd9784d4 23#include "bitmap.h"
8f6fa493 24#include "gimple.h"
8f6fa493 25#include "gimple-ssa.h"
dd9784d4 26#include "cgraph.h"
dd9784d4 27#include "tree-cfg.h"
28#include "tree-phinodes.h"
8f6fa493 29#include "ssa-iterators.h"
9e2e2283 30#include "tree-ssanames.h"
dd9784d4 31#include "tree-ssa-loop.h"
32#include "tree-into-ssa.h"
dd9784d4 33#include "tree-dfa.h"
69ee5dbb 34
35/* Mapping for redirected edges. */
36struct _edge_var_map {
37 tree result; /* PHI result. */
38 tree def; /* PHI arg definition. */
39 source_location locus; /* PHI arg location. */
40};
41typedef struct _edge_var_map edge_var_map;
42
43/* A vector of var maps. */
44typedef vec<edge_var_map, va_heap, vl_embed> edge_var_map_vector;
45
46
47extern void redirect_edge_var_map_add (edge, tree, tree, source_location);
48extern void redirect_edge_var_map_clear (edge);
49extern void redirect_edge_var_map_dup (edge, edge);
50extern edge_var_map_vector *redirect_edge_var_map_vector (edge);
51extern void redirect_edge_var_map_destroy (void);
52extern edge ssa_redirect_edge (edge, basic_block);
53extern void flush_pending_stmts (edge);
9a4a3348 54extern void count_uses_and_derefs (tree, gimple, unsigned *, unsigned *,
55 unsigned *);
56extern void gimple_replace_ssa_lhs (gimple, tree);
69ee5dbb 57extern tree target_for_debug_bind (tree);
58extern void insert_debug_temp_for_var_def (gimple_stmt_iterator *, tree);
59extern void insert_debug_temps_for_defs (gimple_stmt_iterator *);
60extern void reset_debug_uses (gimple);
61extern void release_defs_bitset (bitmap toremove);
62extern void verify_ssa (bool);
63extern void init_tree_ssa (struct function *);
64extern void delete_tree_ssa (void);
65extern bool tree_ssa_useless_type_conversion (tree);
66extern tree tree_ssa_strip_useless_type_conversions (tree);
67
1d2fabca 68extern bool ssa_undefined_value_p (tree);
69ee5dbb 69extern void execute_update_addresses_taken (void);
70
71/* Given an edge_var_map V, return the PHI arg definition. */
72
73static inline tree
74redirect_edge_var_map_def (edge_var_map *v)
75{
76 return v->def;
77}
78
79/* Given an edge_var_map V, return the PHI result. */
80
81static inline tree
82redirect_edge_var_map_result (edge_var_map *v)
83{
84 return v->result;
85}
86
87/* Given an edge_var_map V, return the PHI arg location. */
88
89static inline source_location
90redirect_edge_var_map_location (edge_var_map *v)
91{
92 return v->locus;
93}
94
95
96#endif /* GCC_TREE_SSA_H */