From 42acab1cd6812e2d9e49f4132176f5505f49a0e5 Mon Sep 17 00:00:00 2001 From: tbsaunde Date: Sun, 20 Sep 2015 00:52:59 +0000 Subject: 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 * 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 * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227941 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa-loop-ivopts.c | 61 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 30 deletions(-) (limited to 'gcc/tree-ssa-loop-ivopts.c') diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index b62a7d0cf60..1ddd8bdfd21 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -204,7 +204,7 @@ struct iv_use unsigned sub_id; /* The id of the sub use. */ enum use_type type; /* Type of the use. */ struct iv *iv; /* The induction variable it is based on. */ - gimple stmt; /* Statement in that it occurs. */ + gimple *stmt; /* Statement in that it occurs. */ tree *op_p; /* The place where it occurs. */ bitmap related_cands; /* The set of "related" iv candidates, plus the common important ones. */ @@ -239,7 +239,7 @@ struct iv_cand bool important; /* Whether this is an "important" candidate, i.e. such that it should be considered by all uses. */ ENUM_BITFIELD(iv_position) pos : 8; /* Where it is computed. */ - gimple incremented_at;/* For original biv, the statement where it is + gimple *incremented_at;/* For original biv, the statement where it is incremented. */ tree var_before; /* The variable used for it before increment. */ tree var_after; /* The variable used for it after increment. */ @@ -690,7 +690,7 @@ name_info (struct ivopts_data *data, tree name) emitted in LOOP. */ static bool -stmt_after_ip_normal_pos (struct loop *loop, gimple stmt) +stmt_after_ip_normal_pos (struct loop *loop, gimple *stmt) { basic_block bb = ip_normal_pos (loop), sbb = gimple_bb (stmt); @@ -710,7 +710,7 @@ stmt_after_ip_normal_pos (struct loop *loop, gimple stmt) if the positions are identical. */ static bool -stmt_after_inc_pos (struct iv_cand *cand, gimple stmt, bool true_if_equal) +stmt_after_inc_pos (struct iv_cand *cand, gimple *stmt, bool true_if_equal) { basic_block cand_bb = gimple_bb (cand->incremented_at); basic_block stmt_bb = gimple_bb (stmt); @@ -731,7 +731,7 @@ stmt_after_inc_pos (struct iv_cand *cand, gimple stmt, bool true_if_equal) CAND is incremented in LOOP. */ static bool -stmt_after_increment (struct loop *loop, struct iv_cand *cand, gimple stmt) +stmt_after_increment (struct loop *loop, struct iv_cand *cand, gimple *stmt) { switch (cand->pos) { @@ -1159,7 +1159,7 @@ static void mark_bivs (struct ivopts_data *data) { gphi *phi; - gimple def; + gimple *def; tree var; struct iv *iv, *incr_iv; struct loop *loop = data->current_loop; @@ -1206,7 +1206,7 @@ mark_bivs (struct ivopts_data *data) parameters to IV. */ static bool -find_givs_in_stmt_scev (struct ivopts_data *data, gimple stmt, affine_iv *iv) +find_givs_in_stmt_scev (struct ivopts_data *data, gimple *stmt, affine_iv *iv) { tree lhs, stop; struct loop *loop = data->current_loop; @@ -1247,7 +1247,7 @@ find_givs_in_stmt_scev (struct ivopts_data *data, gimple stmt, affine_iv *iv) /* Finds general ivs in statement STMT. */ static void -find_givs_in_stmt (struct ivopts_data *data, gimple stmt) +find_givs_in_stmt (struct ivopts_data *data, gimple *stmt) { affine_iv iv; @@ -1332,7 +1332,7 @@ find_induction_variables (struct ivopts_data *data) static struct iv_use * record_use (struct ivopts_data *data, tree *use_p, struct iv *iv, - gimple stmt, enum use_type use_type, tree addr_base = NULL, + gimple *stmt, enum use_type use_type, tree addr_base = NULL, unsigned HOST_WIDE_INT addr_offset = 0) { struct iv_use *use = XCNEW (struct iv_use); @@ -1358,7 +1358,7 @@ record_use (struct ivopts_data *data, tree *use_p, struct iv *iv, static struct iv_use * record_sub_use (struct ivopts_data *data, tree *use_p, - struct iv *iv, gimple stmt, enum use_type use_type, + struct iv *iv, gimple *stmt, enum use_type use_type, tree addr_base, unsigned HOST_WIDE_INT addr_offset, unsigned int id_group) { @@ -1432,7 +1432,7 @@ static struct iv_use * find_interesting_uses_op (struct ivopts_data *data, tree op) { struct iv *iv; - gimple stmt; + gimple *stmt; struct iv_use *use; if (TREE_CODE (op) != SSA_NAME) @@ -1476,7 +1476,7 @@ find_interesting_uses_op (struct ivopts_data *data, tree op) condition and false is returned. */ static bool -extract_cond_operands (struct ivopts_data *data, gimple stmt, +extract_cond_operands (struct ivopts_data *data, gimple *stmt, tree **control_var, tree **bound, struct iv **iv_var, struct iv **iv_bound) { @@ -1537,7 +1537,7 @@ end: records it. */ static void -find_interesting_uses_cond (struct ivopts_data *data, gimple stmt) +find_interesting_uses_cond (struct ivopts_data *data, gimple *stmt) { tree *var_p, *bound_p; struct iv *var_iv; @@ -1648,7 +1648,7 @@ find_deriving_biv_for_expr (struct ivopts_data *data, tree expr) unsigned i, n; tree e2, e1; enum tree_code code; - gimple stmt; + gimple *stmt; if (expr == NULL_TREE) return NULL; @@ -1782,7 +1782,7 @@ record_biv_for_address_use (struct ivopts_data *data, struct iv *biv) struct ifs_ivopts_data { struct ivopts_data *ivopts_data; - gimple stmt; + gimple *stmt; tree step; }; @@ -2036,7 +2036,7 @@ strip_offset (tree expr, unsigned HOST_WIDE_INT *offset); static struct iv_use * record_group_use (struct ivopts_data *data, tree *use_p, - struct iv *iv, gimple stmt, enum use_type use_type) + struct iv *iv, gimple *stmt, enum use_type use_type) { unsigned int i; struct iv_use *use; @@ -2073,7 +2073,8 @@ record_group_use (struct ivopts_data *data, tree *use_p, /* Finds addresses in *OP_P inside STMT. */ static void -find_interesting_uses_address (struct ivopts_data *data, gimple stmt, tree *op_p) +find_interesting_uses_address (struct ivopts_data *data, gimple *stmt, + tree *op_p) { tree base = *op_p, step = size_zero_node; struct iv *civ; @@ -2190,7 +2191,7 @@ fail: /* Finds and records invariants used in STMT. */ static void -find_invariants_stmt (struct ivopts_data *data, gimple stmt) +find_invariants_stmt (struct ivopts_data *data, gimple *stmt) { ssa_op_iter iter; use_operand_p use_p; @@ -2206,7 +2207,7 @@ find_invariants_stmt (struct ivopts_data *data, gimple stmt) /* Finds interesting uses of induction variables in the statement STMT. */ static void -find_interesting_uses_stmt (struct ivopts_data *data, gimple stmt) +find_interesting_uses_stmt (struct ivopts_data *data, gimple *stmt) { struct iv *iv; tree op, *lhs, *rhs; @@ -2764,7 +2765,7 @@ find_depends (tree *expr_p, int *ws ATTRIBUTE_UNUSED, void *data) static struct iv_cand * add_candidate_1 (struct ivopts_data *data, tree base, tree step, bool important, enum iv_position pos, - struct iv_use *use, gimple incremented_at, + struct iv_use *use, gimple *incremented_at, struct iv *orig_iv = NULL) { unsigned i; @@ -2997,7 +2998,7 @@ add_standard_iv_candidates (struct ivopts_data *data) static void add_iv_candidate_for_biv (struct ivopts_data *data, struct iv *iv) { - gimple phi; + gimple *phi; tree def; struct iv_cand *cand; @@ -3463,7 +3464,7 @@ computation_cost (tree expr, bool speed) /* Returns variable containing the value of candidate CAND at statement AT. */ static tree -var_at_stmt (struct loop *loop, struct iv_cand *cand, gimple stmt) +var_at_stmt (struct loop *loop, struct iv_cand *cand, gimple *stmt) { if (stmt_after_increment (loop, cand, stmt)) return cand->var_after; @@ -3513,7 +3514,7 @@ determine_common_wider_type (tree *a, tree *b) static bool get_computation_aff (struct loop *loop, - struct iv_use *use, struct iv_cand *cand, gimple at, + struct iv_use *use, struct iv_cand *cand, gimple *at, struct aff_tree *aff) { tree ubase = use->iv->base; @@ -3632,7 +3633,7 @@ get_use_type (struct iv_use *use) static tree get_computation_at (struct loop *loop, - struct iv_use *use, struct iv_cand *cand, gimple at) + struct iv_use *use, struct iv_cand *cand, gimple *at) { aff_tree aff; tree type = get_use_type (use); @@ -4602,7 +4603,7 @@ get_loop_invariant_expr_id (struct ivopts_data *data, tree ubase, static comp_cost get_computation_cost_at (struct ivopts_data *data, struct iv_use *use, struct iv_cand *cand, - bool address_p, bitmap *depends_on, gimple at, + bool address_p, bitmap *depends_on, gimple *at, bool *can_autoinc, int *inv_expr_id) { @@ -4926,7 +4927,7 @@ determine_use_iv_cost_address (struct ivopts_data *data, stores it to VAL. */ static void -cand_value_at (struct loop *loop, struct iv_cand *cand, gimple at, tree niter, +cand_value_at (struct loop *loop, struct iv_cand *cand, gimple *at, tree niter, aff_tree *val) { aff_tree step, delta, nit; @@ -5018,7 +5019,7 @@ difference_cannot_overflow_p (struct ivopts_data *data, tree base, tree offset) if (TREE_CODE (base) == SSA_NAME) { - gimple stmt = SSA_NAME_DEF_STMT (base); + gimple *stmt = SSA_NAME_DEF_STMT (base); if (gimple_code (stmt) != GIMPLE_ASSIGN) return false; @@ -7003,7 +7004,7 @@ static void adjust_iv_update_pos (struct iv_cand *cand, struct iv_use *use) { tree var_after; - gimple iv_update, stmt; + gimple *iv_update, *stmt; basic_block bb; gimple_stmt_iterator gsi, gsi_iv; @@ -7245,7 +7246,7 @@ remove_unused_ivs (struct ivopts_data *data) { imm_use_iterator imm_iter; use_operand_p use_p; - gimple stmt; + gimple *stmt; int count = 0; FOR_EACH_IMM_USE_STMT (stmt, imm_iter, def) @@ -7471,7 +7472,7 @@ loop_body_includes_call (basic_block *body, unsigned num_nodes) for (i = 0; i < num_nodes; i++) for (gsi = gsi_start_bb (body[i]); !gsi_end_p (gsi); gsi_next (&gsi)) { - gimple stmt = gsi_stmt (gsi); + gimple *stmt = gsi_stmt (gsi); if (is_gimple_call (stmt) && !is_inexpensive_builtin (gimple_call_fndecl (stmt))) return true; -- cgit v1.2.1