@@ -1,5 +1,22 @@
2014-10-24 David Malcolm <dmalcolm@redhat.com>
+ * tree-inline.h (struct copy_body_data): Rename field
+ "gimple_call" to "call_stmt".
+
+ * gimplify.c (gimplify_bind_expr): Rename local "gimple_bind" to
+ "bind_stmt".
+ (gimplify_switch_expr): Rename local "gimple_switch" to
+ "switch_stmt".
+ (gimplify_cond_expr): Rename local "gimple_cond" to "cond_stmt".
+ * tree-eh.c (lower_catch): Rename local "gcatch" to "catch_stmt".
+ * tree-inline.c (copy_bb): Update for renaming of field within
+ struct copy_body_data from "gimple_call" to "call_stmt".
+ (copy_cfg_body): Likewise.
+ (copy_debug_stmt): Likewise.
+ (expand_call_inline): Likewise.
+
+2014-10-24 David Malcolm <dmalcolm@redhat.com>
+
Convert various gimple to gimple_phi within ssa-iterators.h
* ssa-iterators.h (FOR_EACH_PHI_OR_STMT_USE): Add checked cast to
@@ -1043,7 +1043,7 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
tree bind_expr = *expr_p;
bool old_save_stack = gimplify_ctxp->save_stack;
tree t;
- gimple_bind gimple_bind;
+ gimple_bind bind_stmt;
gimple_seq body, cleanup;
gimple_call stack_save;
location_t start_locus = 0, end_locus = 0;
@@ -1088,16 +1088,16 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
DECL_GIMPLE_REG_P (t) = 1;
}
- gimple_bind = gimple_build_bind (BIND_EXPR_VARS (bind_expr), NULL,
+ bind_stmt = gimple_build_bind (BIND_EXPR_VARS (bind_expr), NULL,
BIND_EXPR_BLOCK (bind_expr));
- gimple_push_bind_expr (gimple_bind);
+ gimple_push_bind_expr (bind_stmt);
gimplify_ctxp->save_stack = false;
/* Gimplify the body into the GIMPLE_BIND tuple's body. */
body = NULL;
gimplify_stmt (&BIND_EXPR_BODY (bind_expr), &body);
- gimple_bind_set_body (gimple_bind, body);
+ gimple_bind_set_body (bind_stmt, body);
/* Source location wise, the cleanup code (stack_restore and clobbers)
belongs to the end of the block, so propagate what we have. The
@@ -1157,19 +1157,19 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
gimple_seq new_body;
new_body = NULL;
- gs = gimple_build_try (gimple_bind_body (gimple_bind), cleanup,
+ gs = gimple_build_try (gimple_bind_body (bind_stmt), cleanup,
GIMPLE_TRY_FINALLY);
if (stack_save)
gimplify_seq_add_stmt (&new_body, stack_save);
gimplify_seq_add_stmt (&new_body, gs);
- gimple_bind_set_body (gimple_bind, new_body);
+ gimple_bind_set_body (bind_stmt, new_body);
}
gimplify_ctxp->save_stack = old_save_stack;
gimple_pop_bind_expr ();
- gimplify_seq_add_stmt (pre_p, gimple_bind);
+ gimplify_seq_add_stmt (pre_p, bind_stmt);
if (temp)
{
@@ -1484,7 +1484,7 @@ gimplify_switch_expr (tree *expr_p, gimple_seq *pre_p)
vec<tree> labels;
vec<tree> saved_labels;
tree default_case = NULL_TREE;
- gimple_switch gimple_switch;
+ gimple_switch switch_stmt;
/* If someone can be bothered to fill in the labels, they can
be bothered to null out the body too. */
@@ -1513,9 +1513,9 @@ gimplify_switch_expr (tree *expr_p, gimple_seq *pre_p)
gimplify_seq_add_stmt (&switch_body_seq, new_default);
}
- gimple_switch = gimple_build_switch (SWITCH_COND (switch_expr),
+ switch_stmt = gimple_build_switch (SWITCH_COND (switch_expr),
default_case, labels);
- gimplify_seq_add_stmt (pre_p, gimple_switch);
+ gimplify_seq_add_stmt (pre_p, switch_stmt);
gimplify_seq_add_seq (pre_p, switch_body_seq);
labels.release ();
}
@@ -2957,7 +2957,7 @@ gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback)
enum gimplify_status ret;
tree label_true, label_false, label_cont;
bool have_then_clause_p, have_else_clause_p;
- gimple_cond gimple_cond;
+ gimple_cond cond_stmt;
enum tree_code pred_code;
gimple_seq seq = NULL;
@@ -3106,10 +3106,10 @@ gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback)
gimple_cond_get_ops_from_tree (COND_EXPR_COND (expr), &pred_code, &arm1,
&arm2);
- gimple_cond = gimple_build_cond (pred_code, arm1, arm2, label_true,
+ cond_stmt = gimple_build_cond (pred_code, arm1, arm2, label_true,
label_false);
- gimplify_seq_add_stmt (&seq, gimple_cond);
+ gimplify_seq_add_stmt (&seq, cond_stmt);
label_cont = NULL_TREE;
if (!have_then_clause_p)
{
@@ -1790,13 +1790,13 @@ lower_catch (struct leh_state *state, gimple_try tp)
gsi_next (&gsi))
{
eh_catch c;
- gimple_catch gcatch;
+ gimple_catch catch_stmt;
gimple_seq handler;
- gcatch = as_a <gimple_catch> (gsi_stmt (gsi));
- c = gen_eh_region_catch (try_region, gimple_catch_types (gcatch));
+ catch_stmt = as_a <gimple_catch> (gsi_stmt (gsi));
+ c = gen_eh_region_catch (try_region, gimple_catch_types (catch_stmt));
- handler = gimple_catch_handler (gcatch);
+ handler = gimple_catch_handler (catch_stmt);
lower_eh_constructs_1 (&this_state, &handler);
c->label = create_artificial_label (UNKNOWN_LOCATION);
@@ -1731,14 +1731,14 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
call_stmt = dyn_cast <gimple_call> (stmt);
if (call_stmt
&& gimple_call_va_arg_pack_p (call_stmt)
- && id->gimple_call)
+ && id->call_stmt)
{
/* __builtin_va_arg_pack () should be replaced by
all arguments corresponding to ... in the caller. */
tree p;
gimple_call new_call;
vec<tree> argarray;
- size_t nargs = gimple_call_num_args (id->gimple_call);
+ size_t nargs = gimple_call_num_args (id->call_stmt);
size_t n;
for (p = DECL_ARGUMENTS (id->src_fn); p; p = DECL_CHAIN (p))
@@ -1756,8 +1756,8 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
/* Append the arguments passed in '...' */
memcpy (argarray.address () + gimple_call_num_args (call_stmt),
- gimple_call_arg_ptr (id->gimple_call, 0)
- + (gimple_call_num_args (id->gimple_call) - nargs),
+ gimple_call_arg_ptr (id->call_stmt, 0)
+ + (gimple_call_num_args (id->call_stmt) - nargs),
nargs * sizeof (tree));
new_call = gimple_build_call_vec (gimple_call_fn (call_stmt),
@@ -1777,14 +1777,14 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
stmt = new_call;
}
else if (is_gimple_call (stmt)
- && id->gimple_call
+ && id->call_stmt
&& (decl = gimple_call_fndecl (stmt))
&& DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL
&& DECL_FUNCTION_CODE (decl) == BUILT_IN_VA_ARG_PACK_LEN)
{
/* __builtin_va_arg_pack_len () should be replaced by
the number of anonymous arguments. */
- size_t nargs = gimple_call_num_args (id->gimple_call);
+ size_t nargs = gimple_call_num_args (id->call_stmt);
tree count, p;
gimple new_stmt;
@@ -2579,12 +2579,12 @@ copy_cfg_body (copy_body_data * id, gcov_type count, int frequency_scale,
/* Now that we've duplicated the blocks, duplicate their edges. */
basic_block abnormal_goto_dest = NULL;
- if (id->gimple_call
- && stmt_can_make_abnormal_goto (id->gimple_call))
+ if (id->call_stmt
+ && stmt_can_make_abnormal_goto (id->call_stmt))
{
- gimple_stmt_iterator gsi = gsi_for_stmt (id->gimple_call);
+ gimple_stmt_iterator gsi = gsi_for_stmt (id->call_stmt);
- bb = gimple_bb (id->gimple_call);
+ bb = gimple_bb (id->call_stmt);
gsi_next (&gsi);
if (gsi_end_p (gsi))
abnormal_goto_dest = get_abnormal_succ_dispatcher (bb);
@@ -2729,7 +2729,7 @@ copy_debug_stmt (gimple_debug stmt, copy_body_data *id)
t = gimple_debug_source_bind_get_value (stmt);
if (t != NULL_TREE
&& TREE_CODE (t) == PARM_DECL
- && id->gimple_call)
+ && id->call_stmt)
{
vec<tree, va_gc> **debug_args = decl_debug_args_lookup (id->src_fn);
unsigned int i;
@@ -4329,7 +4329,7 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id)
id->src_fn = fn;
id->src_node = cg_edge->callee;
id->src_cfun = DECL_STRUCT_FUNCTION (fn);
- id->gimple_call = stmt;
+ id->call_stmt = stmt;
gcc_assert (!id->src_cfun->after_inlining);
@@ -75,7 +75,7 @@ struct copy_body_data
/* GIMPLE_CALL if va arg parameter packs should be expanded or NULL
is not. */
- gimple gimple_call;
+ gimple call_stmt;
/* Exception landing pad the inlined call lies in. */
int eh_lp_nr;