aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r--gcc/tree-if-conv.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 2062758..93effaa 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -2916,12 +2916,6 @@ ifcvt_local_dce (class loop *loop)
enum gimple_code code;
use_operand_p use_p;
imm_use_iterator imm_iter;
- std::pair <tree, tree> *name_pair;
- unsigned int i;
-
- FOR_EACH_VEC_ELT (redundant_ssa_names, i, name_pair)
- replace_uses_by (name_pair->first, name_pair->second);
- redundant_ssa_names.release ();
/* The loop has a single BB only. */
basic_block bb = loop->header;
@@ -3124,6 +3118,13 @@ tree_if_conversion (class loop *loop, vec<gimple *> *preds)
exit_bbs = BITMAP_ALLOC (NULL);
bitmap_set_bit (exit_bbs, single_exit (loop)->dest->index);
bitmap_set_bit (exit_bbs, loop->latch->index);
+
+ std::pair <tree, tree> *name_pair;
+ unsigned ssa_names_idx;
+ FOR_EACH_VEC_ELT (redundant_ssa_names, ssa_names_idx, name_pair)
+ replace_uses_by (name_pair->first, name_pair->second);
+ redundant_ssa_names.release ();
+
todo |= do_rpo_vn (cfun, loop_preheader_edge (loop), exit_bbs);
/* Delete dead predicate computations. */