@@ -1420,7 +1420,7 @@ create_cond_insert_point (gimple_stmt_iterator *iter,
pointing to initially. */
static void
-insert_if_then_before_iter (gimple cond,
+insert_if_then_before_iter (gimple_cond cond,
gimple_stmt_iterator *iter,
bool then_more_likely_p,
basic_block *then_bb,
@@ -1706,10 +1706,10 @@ instrument_mem_region_access (tree base, tree len,
}
// falltrough instructions, starting with *ITER. */
- gimple g = gimple_build_cond (NE_EXPR,
- len,
- build_int_cst (TREE_TYPE (len), 0),
- NULL_TREE, NULL_TREE);
+ gimple_cond g = gimple_build_cond (NE_EXPR,
+ len,
+ build_int_cst (TREE_TYPE (len), 0),
+ NULL_TREE, NULL_TREE);
gimple_set_location (g, location);
insert_if_then_before_iter (g, iter, /*then_more_likely_p=*/true,
&then_bb, &fallthrough_bb);
@@ -690,7 +690,7 @@ create_empty_if_region_on_edge (edge entry_edge, tree condition)
basic_block cond_bb, true_bb, false_bb, join_bb;
edge e_true, e_false, exit_edge;
- gimple cond_stmt;
+ gimple_cond cond_stmt;
tree simple_cond;
gimple_stmt_iterator gsi;
@@ -11557,7 +11557,7 @@ simd_clone_adjust (struct cgraph_node *node)
make_edge (incr_bb, latch_bb, EDGE_TRUE_VALUE); */
FALLTHRU_EDGE (incr_bb)->flags = EDGE_TRUE_VALUE;
- gimple phi = create_phi_node (iter1, body_bb);
+ gimple_phi phi = create_phi_node (iter1, body_bb);
edge preheader_edge = find_edge (entry_bb, body_bb);
edge latch_edge = single_succ_edge (latch_bb);
add_phi_arg (phi, build_zero_cst (unsigned_type_node), preheader_edge,
@@ -783,7 +783,7 @@ set_ifsese_condition (ifsese if_region, tree condition)
basic_block bb = entry->dest;
gimple last = last_stmt (bb);
gimple_stmt_iterator gsi = gsi_last_bb (bb);
- gimple cond_stmt;
+ gimple_cond cond_stmt;
gcc_assert (gimple_code (last) == GIMPLE_COND);
@@ -332,7 +332,9 @@ gen_one_condition (tree arg, int lbub,
{
tree lbub_real_cst, lbub_cst, float_type;
tree temp, tempn, tempc, tempcn;
- gimple stmt1, stmt2, stmt3;
+ gimple_assign stmt1;
+ gimple_assign stmt2;
+ gimple_cond stmt3;
float_type = TREE_TYPE (arg);
lbub_cst = build_int_cst (integer_type_node, lbub);
@@ -953,7 +953,8 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb,
tree arg0, tree arg1)
{
tree result, type;
- gimple cond, new_stmt;
+ gimple_cond cond;
+ gimple_assign new_stmt;
edge true_edge, false_edge;
enum tree_code cmp, minmax, ass_code;
tree smaller, larger, arg_true, arg_false;
@@ -965,7 +966,7 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb,
if (HONOR_NANS (TYPE_MODE (type)))
return false;
- cond = last_stmt (cond_bb);
+ cond = last_stmt (cond_bb)->as_a_gimple_cond ();
cmp = gimple_cond_code (cond);
/* This transformation is only valid for order comparisons. Record which
@@ -1677,7 +1678,8 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb,
{
gimple assign = last_and_only_stmt (middle_bb);
tree lhs, rhs, name, name2;
- gimple newphi, new_stmt;
+ gimple_phi newphi;
+ gimple_assign new_stmt;
gimple_stmt_iterator gsi;
source_location locus;
@@ -1750,7 +1752,8 @@ cond_if_else_store_replacement_1 (basic_block then_bb, basic_block else_bb,
tree lhs_base, lhs, then_rhs, else_rhs, name;
source_location then_locus, else_locus;
gimple_stmt_iterator gsi;
- gimple newphi, new_stmt;
+ gimple_phi newphi;
+ gimple_assign new_stmt;
if (then_assign == NULL
|| !gimple_assign_single_p (then_assign)
@@ -3443,8 +3443,11 @@ do_regular_insertion (basic_block block, basic_block dom)
tree temp = make_temp_ssa_name (get_expr_type (expr),
NULL, "pretmp");
- gimple assign = gimple_build_assign (temp,
- edoubleprime->kind == CONSTANT ? PRE_EXPR_CONSTANT (edoubleprime) : PRE_EXPR_NAME (edoubleprime));
+ gimple_assign assign =
+ gimple_build_assign (temp,
+ edoubleprime->kind == CONSTANT ?
+ PRE_EXPR_CONSTANT (edoubleprime) :
+ PRE_EXPR_NAME (edoubleprime));
gimple_stmt_iterator gsi = gsi_after_labels (block);
gsi_insert_before (&gsi, assign, GSI_NEW_STMT);
@@ -85,7 +85,7 @@ hoist_edge_and_branch_if_true (gimple_stmt_iterator *gsip,
bool update_dominators)
{
tree tmp;
- gimple cond_stmt;
+ gimple_cond cond_stmt;
edge e_false;
basic_block new_bb, split_bb = gsi_bb (*gsip);
bool dominated_e_true = false;
@@ -1130,11 +1130,11 @@ build_arrays (gimple_switch swtch, struct switch_conv_info *info)
/* Generates and appropriately inserts loads of default values at the position
given by BSI. Returns the last inserted statement. */
-static gimple
+static gimple_assign
gen_def_assigns (gimple_stmt_iterator *gsi, struct switch_conv_info *info)
{
int i;
- gimple assign = NULL;
+ gimple_assign assign = NULL;
for (i = 0; i < info->phi_count; i++)
{
@@ -1221,9 +1221,9 @@ gen_inbound_check (gimple_switch swtch, struct switch_conv_info *info)
tree utype, tidx;
tree bound;
- gimple cond_stmt;
+ gimple_cond cond_stmt;
- gimple last_assign;
+ gimple_assign last_assign;
gimple_stmt_iterator gsi;
basic_block bb0, bb1, bb2, bbf, bbd;
edge e01, e02, e21, e1d, e1f, e2f;
@@ -929,7 +929,7 @@ slpeel_add_loop_guard (basic_block guard_bb, tree cond,
{
gimple_stmt_iterator gsi;
edge new_e, enter_e;
- gimple cond_stmt;
+ gimple_cond cond_stmt;
gimple_seq gimplify_stmt_list = NULL;
enter_e = EDGE_SUCC (guard_bb, 0);
@@ -1042,9 +1042,9 @@ set_prologue_iterations (basic_block bb_before_first_loop,
basic_block cond_bb, then_bb;
tree var, prologue_after_cost_adjust_name;
gimple_stmt_iterator gsi;
- gimple newphi;
+ gimple_phi newphi;
edge e_true, e_false, e_fallthru;
- gimple cond_stmt;
+ gimple_cond cond_stmt;
gimple_seq stmts = NULL;
tree cost_pre_condition = NULL_TREE;
tree scalar_loop_iters =
@@ -1418,7 +1418,7 @@ gimple_ic (gimple icall_stmt, struct cgraph_node *direct_call,
&& (dflags & ECF_NORETURN) == 0)
{
tree result = gimple_call_lhs (icall_stmt);
- gimple phi = create_phi_node (result, join_bb);
+ gimple_phi phi = create_phi_node (result, join_bb);
gimple_call_set_lhs (icall_stmt,
duplicate_ssa_name (result, icall_stmt));
add_phi_arg (phi, gimple_call_lhs (icall_stmt), e_ij, UNKNOWN_LOCATION);
@@ -1586,7 +1586,9 @@ static void
gimple_stringop_fixed_value (gimple_call vcall_stmt, tree icall_size, int prob,
gcov_type count, gcov_type all)
{
- gimple tmp_stmt, cond_stmt, icall_stmt;
+ gimple_assign tmp_stmt;
+ gimple_cond cond_stmt;
+ gimple_call icall_stmt;
tree tmp0, tmp1, vcall_size, optype;
basic_block cond_bb, icall_bb, vcall_bb, join_bb;
edge e_ci, e_cv, e_iv, e_ij, e_vj;
@@ -1618,7 +1620,7 @@ gimple_stringop_fixed_value (gimple_call vcall_stmt, tree icall_size, int prob,
gimple_set_vdef (vcall_stmt, NULL);
gimple_set_vuse (vcall_stmt, NULL);
update_stmt (vcall_stmt);
- icall_stmt = gimple_copy (vcall_stmt);
+ icall_stmt = gimple_copy (vcall_stmt)->as_a_gimple_call ();
gimple_call_set_arg (icall_stmt, size_arg, icall_size);
gsi_insert_before (&gsi, icall_stmt, GSI_SAME_STMT);
@@ -1658,7 +1660,7 @@ gimple_stringop_fixed_value (gimple_call vcall_stmt, tree icall_size, int prob,
&& TREE_CODE (gimple_call_lhs (vcall_stmt)) == SSA_NAME)
{
tree result = gimple_call_lhs (vcall_stmt);
- gimple phi = create_phi_node (result, join_bb);
+ gimple_phi phi = create_phi_node (result, join_bb);
gimple_call_set_lhs (vcall_stmt,
duplicate_ssa_name (result, vcall_stmt));
add_phi_arg (phi, gimple_call_lhs (vcall_stmt), e_vj, UNKNOWN_LOCATION);