aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde@tbsaunde.org>2015-09-20 00:52:59 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2015-09-20 00:52:59 +0000
commit355fe0884b8097c32e859f0df57c83bde0c6bd26 (patch)
treeaadb7908b4b80ecaf7e744ca1ae42a59a12b07ea /gcc/tree-inline.c
parente4f2a3e4588bbc3691b452d8a2c520e8196b0ef3 (diff)
downloadgcc-355fe0884b8097c32e859f0df57c83bde0c6bd26.zip
gcc-355fe0884b8097c32e859f0df57c83bde0c6bd26.tar.gz
gcc-355fe0884b8097c32e859f0df57c83bde0c6bd26.tar.bz2
switch from gimple to gimple*
This renames the gimple_statement_base struct to gimple removes the typedef of gimple_statement_base * to gimple, and then adjusts all of the places that use the type. gcc/ChangeLog: 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org> * coretypes.h (gimple): Change typedef to be a forward declaration. * gimple.h (gimple_statement_base): rename to gimple. * (all functions and types using gimple): Adjust. * *.[ch]: Likewise. gcc/cp/ChangeLog: 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org> * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust. From-SVN: r227941
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index e1ceea4..abaea3f 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -144,9 +144,9 @@ static void prepend_lexical_block (tree current_block, tree new_block);
static tree copy_decl_to_var (tree, copy_body_data *);
static tree copy_result_decl_to_var (tree, copy_body_data *);
static tree copy_decl_maybe_to_var (tree, copy_body_data *);
-static gimple_seq remap_gimple_stmt (gimple, copy_body_data *);
+static gimple_seq remap_gimple_stmt (gimple *, copy_body_data *);
static bool delete_unreachable_blocks_update_callgraph (copy_body_data *id);
-static void insert_init_stmt (copy_body_data *, basic_block, gimple);
+static void insert_init_stmt (copy_body_data *, basic_block, gimple *);
/* Insert a tree->tree mapping for ID. Despite the name suggests
that the trees should be variables, it is used for more than that. */
@@ -214,7 +214,7 @@ remap_ssa_name (tree name, copy_body_data *id)
&& single_succ_p (ENTRY_BLOCK_PTR_FOR_FN (cfun)))
{
tree vexpr = make_node (DEBUG_EXPR_DECL);
- gimple def_temp;
+ gimple *def_temp;
gimple_stmt_iterator gsi;
tree val = SSA_NAME_VAR (name);
@@ -317,7 +317,7 @@ remap_ssa_name (tree name, copy_body_data *id)
|| EDGE_COUNT (id->entry_bb->preds) != 1))
{
gimple_stmt_iterator gsi = gsi_last_bb (id->entry_bb);
- gimple init_stmt;
+ gimple *init_stmt;
tree zero = build_zero_cst (TREE_TYPE (new_tree));
init_stmt = gimple_build_assign (new_tree, zero);
@@ -797,10 +797,10 @@ remap_gimple_seq (gimple_seq body, copy_body_data *id)
/* Copy a GIMPLE_BIND statement STMT, remapping all the symbols in its
block using the mapping information in ID. */
-static gimple
+static gimple *
copy_gimple_bind (gbind *stmt, copy_body_data *id)
{
- gimple new_bind;
+ gimple *new_bind;
tree new_block, new_vars;
gimple_seq body, new_body;
@@ -1319,9 +1319,9 @@ remap_eh_region_tree_nr (tree old_t_nr, copy_body_data *id)
information in ID. Return the new statement copy. */
static gimple_seq
-remap_gimple_stmt (gimple stmt, copy_body_data *id)
+remap_gimple_stmt (gimple *stmt, copy_body_data *id)
{
- gimple copy = NULL;
+ gimple *copy = NULL;
struct walk_stmt_info wi;
bool skip_first = false;
gimple_seq stmts = NULL;
@@ -1348,7 +1348,7 @@ remap_gimple_stmt (gimple stmt, copy_body_data *id)
if (retbnd && bndslot)
{
- gimple bndcopy = gimple_build_assign (bndslot, retbnd);
+ gimple *bndcopy = gimple_build_assign (bndslot, retbnd);
memset (&wi, 0, sizeof (wi));
wi.info = id;
walk_gimple_op (bndcopy, remap_gimple_op_r, &wi);
@@ -1576,7 +1576,7 @@ remap_gimple_stmt (gimple stmt, copy_body_data *id)
if (TREE_CODE (lhs) == MEM_REF
&& TREE_CODE (TREE_OPERAND (lhs, 0)) == SSA_NAME)
{
- gimple def_stmt = SSA_NAME_DEF_STMT (TREE_OPERAND (lhs, 0));
+ gimple *def_stmt = SSA_NAME_DEF_STMT (TREE_OPERAND (lhs, 0));
if (gimple_bb (def_stmt)
&& !bitmap_bit_p (id->blocks_to_copy,
gimple_bb (def_stmt)->index))
@@ -1750,8 +1750,8 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
gimple_seq stmts;
- gimple stmt = gsi_stmt (gsi);
- gimple orig_stmt = stmt;
+ gimple *stmt = gsi_stmt (gsi);
+ gimple *orig_stmt = stmt;
gimple_stmt_iterator stmts_gsi;
bool stmt_added = false;
@@ -1908,7 +1908,7 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
the number of anonymous arguments. */
size_t nargs = gimple_call_num_args (id->call_stmt), i;
tree count, p;
- gimple new_stmt;
+ gimple *new_stmt;
for (p = DECL_ARGUMENTS (id->src_fn); p; p = DECL_CHAIN (p))
nargs--;
@@ -2204,7 +2204,7 @@ copy_edges_for_bb (basic_block bb, gcov_type count_scale, basic_block ret_bb,
for (si = gsi_start_bb (new_bb); !gsi_end_p (si);)
{
- gimple copy_stmt;
+ gimple *copy_stmt;
bool can_throw, nonlocal_goto;
copy_stmt = gsi_stmt (si);
@@ -2479,7 +2479,7 @@ maybe_move_debug_stmts_to_successors (copy_body_data *id, basic_block new_bb)
gimple_stmt_iterator dsi = gsi_after_labels (e->dest);
while (is_gimple_debug (gsi_stmt (ssi)))
{
- gimple stmt = gsi_stmt (ssi);
+ gimple *stmt = gsi_stmt (ssi);
gdebug *new_stmt;
tree var;
tree value;
@@ -2582,10 +2582,10 @@ void
redirect_all_calls (copy_body_data * id, basic_block bb)
{
gimple_stmt_iterator si;
- gimple last = last_stmt (bb);
+ gimple *last = last_stmt (bb);
for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
{
- gimple stmt = gsi_stmt (si);
+ gimple *stmt = gsi_stmt (si);
if (is_gimple_call (stmt))
{
struct cgraph_edge *edge = id->dst_node->get_edge (stmt);
@@ -2978,12 +2978,12 @@ self_inlining_addr_expr (tree value, tree fn)
lexical block and line number information from base_stmt, if given,
or from the last stmt of the block otherwise. */
-static gimple
+static gimple *
insert_init_debug_bind (copy_body_data *id,
basic_block bb, tree var, tree value,
- gimple base_stmt)
+ gimple *base_stmt)
{
- gimple note;
+ gimple *note;
gimple_stmt_iterator gsi;
tree tracked_var;
@@ -3018,7 +3018,7 @@ insert_init_debug_bind (copy_body_data *id,
}
static void
-insert_init_stmt (copy_body_data *id, basic_block bb, gimple init_stmt)
+insert_init_stmt (copy_body_data *id, basic_block bb, gimple *init_stmt)
{
/* If VAR represents a zero-sized variable, it's possible that the
assignment statement may result in no gimple statements. */
@@ -3057,11 +3057,11 @@ insert_init_stmt (copy_body_data *id, basic_block bb, gimple init_stmt)
/* Initialize parameter P with VALUE. If needed, produce init statement
at the end of BB. When BB is NULL, we return init statement to be
output later. */
-static gimple
+static gimple *
setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
basic_block bb, tree *vars)
{
- gimple init_stmt = NULL;
+ gimple *init_stmt = NULL;
tree var;
tree rhs = value;
tree def = (gimple_in_ssa_p (cfun)
@@ -3219,7 +3219,7 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
top of the stack in ID from the GIMPLE_CALL STMT. */
static void
-initialize_inlined_parameters (copy_body_data *id, gimple stmt,
+initialize_inlined_parameters (copy_body_data *id, gimple *stmt,
tree fn, basic_block bb)
{
tree parms;
@@ -3571,7 +3571,7 @@ inline_forbidden_p_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p,
{
tree fn = (tree) wip->info;
tree t;
- gimple stmt = gsi_stmt (*gsi);
+ gimple *stmt = gsi_stmt (*gsi);
switch (gimple_code (stmt))
{
@@ -3708,7 +3708,7 @@ inline_forbidden_p (tree fndecl)
FOR_EACH_BB_FN (bb, fun)
{
- gimple ret;
+ gimple *ret;
gimple_seq seq = bb_seq (bb);
ret = walk_gimple_seq (seq, inline_forbidden_p_stmt, NULL, &wi);
forbidden_p = (ret != NULL);
@@ -3990,7 +3990,7 @@ int estimate_num_insns_seq (gimple_seq stmts, eni_weights *weights)
WEIGHTS contains weights attributed to various constructs. */
int
-estimate_num_insns (gimple stmt, eni_weights *weights)
+estimate_num_insns (gimple *stmt, eni_weights *weights)
{
unsigned cost, i;
enum gimple_code code = gimple_code (stmt);
@@ -4375,7 +4375,7 @@ reset_debug_bindings (copy_body_data *id, gimple_stmt_iterator gsi)
/* If STMT is a GIMPLE_CALL, replace it with its inline expansion. */
static bool
-expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
+expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id)
{
tree use_retvar;
tree fn;
@@ -4712,7 +4712,7 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
'a = foo (...)', substitute the call with 'a = USE_RETVAR'. */
if (use_retvar && gimple_call_lhs (stmt))
{
- gimple old_stmt = stmt;
+ gimple *old_stmt = stmt;
stmt = gimple_build_assign (gimple_call_lhs (stmt), use_retvar);
gsi_replace (&stmt_gsi, stmt, false);
maybe_clean_or_replace_eh_stmt (old_stmt, stmt);
@@ -4756,8 +4756,8 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
/* Put returned bounds into the correct place if required. */
if (return_bounds)
{
- gimple old_stmt = SSA_NAME_DEF_STMT (return_bounds);
- gimple new_stmt = gimple_build_assign (return_bounds, id->retbnd);
+ gimple *old_stmt = SSA_NAME_DEF_STMT (return_bounds);
+ gimple *new_stmt = gimple_build_assign (return_bounds, id->retbnd);
gimple_stmt_iterator bnd_gsi = gsi_for_stmt (old_stmt);
unlink_stmt_vdef (old_stmt);
gsi_replace (&bnd_gsi, new_stmt, false);
@@ -4818,7 +4818,7 @@ gimple_expand_calls_inline (basic_block bb, copy_body_data *id)
for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi);)
{
- gimple stmt = gsi_stmt (gsi);
+ gimple *stmt = gsi_stmt (gsi);
gsi_prev (&gsi);
if (is_gimple_call (stmt)
@@ -4834,7 +4834,7 @@ gimple_expand_calls_inline (basic_block bb, copy_body_data *id)
in the STATEMENTS pointer set. */
static void
-fold_marked_statements (int first, hash_set<gimple> *statements)
+fold_marked_statements (int first, hash_set<gimple *> *statements)
{
for (; first < n_basic_blocks_for_fn (cfun); first++)
if (BASIC_BLOCK_FOR_FN (cfun, first))
@@ -4846,7 +4846,7 @@ fold_marked_statements (int first, hash_set<gimple> *statements)
gsi_next (&gsi))
if (statements->contains (gsi_stmt (gsi)))
{
- gimple old_stmt = gsi_stmt (gsi);
+ gimple *old_stmt = gsi_stmt (gsi);
tree old_decl = is_gimple_call (old_stmt) ? gimple_call_fndecl (old_stmt) : 0;
if (old_decl && DECL_BUILT_IN (old_decl))
@@ -4857,7 +4857,7 @@ fold_marked_statements (int first, hash_set<gimple> *statements)
gsi_prev (&i2);
if (fold_stmt (&gsi))
{
- gimple new_stmt;
+ gimple *new_stmt;
/* If a builtin at the end of a bb folded into nothing,
the following loop won't work. */
if (gsi_end_p (gsi))
@@ -4903,7 +4903,7 @@ fold_marked_statements (int first, hash_set<gimple> *statements)
{
/* Re-read the statement from GSI as fold_stmt() may
have changed it. */
- gimple new_stmt = gsi_stmt (gsi);
+ gimple *new_stmt = gsi_stmt (gsi);
update_stmt (new_stmt);
if (is_gimple_call (old_stmt)
@@ -4945,7 +4945,7 @@ optimize_inline_calls (tree fn)
id.transform_return_to_modify = true;
id.transform_parameter = true;
id.transform_lang_insert_block = NULL;
- id.statements_to_fold = new hash_set<gimple>;
+ id.statements_to_fold = new hash_set<gimple *>;
push_gimplify_context ();
@@ -5190,7 +5190,7 @@ replace_locals_stmt (gimple_stmt_iterator *gsip,
struct walk_stmt_info *wi)
{
copy_body_data *id = (copy_body_data *) wi->info;
- gimple gs = gsi_stmt (*gsip);
+ gimple *gs = gsi_stmt (*gsip);
if (gbind *stmt = dyn_cast <gbind *> (gs))
{
@@ -5633,7 +5633,7 @@ tree_function_versioning (tree old_decl, tree new_decl,
unsigned i;
struct ipa_replace_map *replace_info;
basic_block old_entry_block, bb;
- auto_vec<gimple, 10> init_stmts;
+ auto_vec<gimple *, 10> init_stmts;
tree vars = NULL_TREE;
gcc_assert (TREE_CODE (old_decl) == FUNCTION_DECL
@@ -5675,7 +5675,7 @@ tree_function_versioning (tree old_decl, tree new_decl,
memset (&id, 0, sizeof (id));
/* Generate a new name for the new version. */
- id.statements_to_fold = new hash_set<gimple>;
+ id.statements_to_fold = new hash_set<gimple *>;
id.decl_map = new hash_map<tree, tree>;
id.debug_map = NULL;
@@ -5715,7 +5715,7 @@ tree_function_versioning (tree old_decl, tree new_decl,
if (tree_map)
for (i = 0; i < tree_map->length (); i++)
{
- gimple init;
+ gimple *init;
replace_info = (*tree_map)[i];
if (replace_info->replace_p)
{