diff options
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r-- | gcc/tree-ssa-loop-im.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 7823e1711e7..a0c45821cdb 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -720,15 +720,14 @@ move_computations (void) fini_walk_dominator_tree (&walk_data); loop_commit_inserts (); - rewrite_into_ssa (false); - if (!bitmap_empty_p (vars_to_rename)) - { - /* The rewrite of ssa names may cause violation of loop closed ssa - form invariants. TODO -- avoid these rewrites completely. - Information in virtual phi nodes is sufficient for it. */ - rewrite_into_loop_closed_ssa (NULL); - } - bitmap_clear (vars_to_rename); + + if (need_ssa_update_p ()) + update_ssa (TODO_update_ssa); + + /* The movement of LI code may cause violation of loop closed SSA + form invariants. TODO -- avoid these rewrites completely. + Information in virtual phi nodes is sufficient for it. */ + rewrite_into_loop_closed_ssa (NULL); } /* Checks whether the statement defining variable *INDEX can be hoisted @@ -1096,10 +1095,7 @@ rewrite_mem_refs (tree tmp_var, struct mem_ref *mem_refs) for (; mem_refs; mem_refs = mem_refs->next) { FOR_EACH_SSA_TREE_OPERAND (var, mem_refs->stmt, iter, SSA_OP_ALL_VIRTUALS) - { - var = SSA_NAME_VAR (var); - bitmap_set_bit (vars_to_rename, var_ann (var)->uid); - } + mark_sym_for_renaming (SSA_NAME_VAR (var)); *mem_refs->ref = tmp_var; update_stmt (mem_refs->stmt); |