aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-unswitch.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
-rw-r--r--gcc/tree-ssa-loop-unswitch.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index e00fe18..cb235f0 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -113,10 +113,9 @@ tree_ssa_unswitch_loops (struct loops *loops)
static tree
tree_may_unswitch_on (basic_block bb, struct loop *loop)
{
- tree stmt, def, cond;
+ tree stmt, def, cond, use;
basic_block def_bb;
- use_optype uses;
- unsigned i;
+ ssa_op_iter iter;
/* BB must end in a simple conditional jump. */
stmt = last_stmt (bb);
@@ -124,10 +123,9 @@ tree_may_unswitch_on (basic_block bb, struct loop *loop)
return NULL_TREE;
/* Condition must be invariant. */
- uses = STMT_USE_OPS (stmt);
- for (i = 0; i < NUM_USES (uses); i++)
+ FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE)
{
- def = SSA_NAME_DEF_STMT (USE_OP (uses, i));
+ def = SSA_NAME_DEF_STMT (use);
def_bb = bb_for_stmt (def);
if (def_bb
&& flow_bb_inside_loop_p (loop, def_bb))