diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-24 16:20:16 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-24 16:20:16 +0000 |
commit | 66d211a3decfba4e1ef1a34948c74d2f656bf01f (patch) | |
tree | 8b1614cffde14fc27bb0364e68b21853ce207c89 /gcc/tree-ssa-loop-im.c | |
parent | 3a343682c01eb70d6b4a65a9efe4cbb2e46c374c (diff) | |
parent | d16bd0a94979319a3a2c73e7ae51a53c4fb37f3f (diff) |
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@209755 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r-- | gcc/tree-ssa-loop-im.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 2e67f620ea0d..5863127c4937 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -1544,15 +1544,6 @@ analyze_memory_references (void) struct loop *loop, *outer; unsigned i, n; -#if 0 - /* Initialize bb_loop_postorder with a mapping from loop->num to - its postorder index. */ - i = 0; - bb_loop_postorder = XNEWVEC (unsigned, number_of_loops (cfun)); - FOR_EACH_LOOP (loop, LI_FROM_INNERMOST) - bb_loop_postorder[loop->num] = i++; -#endif - /* Collect all basic-blocks in loops and sort them after their loops postorder. */ i = 0; @@ -1807,6 +1798,7 @@ execute_sm_if_changed (edge ex, tree mem, tree tmp_var, tree flag) gimple_stmt_iterator gsi; gimple stmt; struct prev_flag_edges *prev_edges = (struct prev_flag_edges *) ex->aux; + bool irr = ex->flags & EDGE_IRREDUCIBLE_LOOP; /* ?? Insert store after previous store if applicable. See note below. */ @@ -1821,8 +1813,9 @@ execute_sm_if_changed (edge ex, tree mem, tree tmp_var, tree flag) old_dest = ex->dest; new_bb = split_edge (ex); then_bb = create_empty_bb (new_bb); - if (current_loops && new_bb->loop_father) - add_bb_to_loop (then_bb, new_bb->loop_father); + if (irr) + then_bb->flags = BB_IRREDUCIBLE_LOOP; + add_bb_to_loop (then_bb, new_bb->loop_father); gsi = gsi_start_bb (new_bb); stmt = gimple_build_cond (NE_EXPR, flag, boolean_false_node, @@ -1834,9 +1827,12 @@ execute_sm_if_changed (edge ex, tree mem, tree tmp_var, tree flag) stmt = gimple_build_assign (unshare_expr (mem), tmp_var); gsi_insert_after (&gsi, stmt, GSI_CONTINUE_LINKING); - make_edge (new_bb, then_bb, EDGE_TRUE_VALUE); - make_edge (new_bb, old_dest, EDGE_FALSE_VALUE); - then_old_edge = make_edge (then_bb, old_dest, EDGE_FALLTHRU); + make_edge (new_bb, then_bb, + EDGE_TRUE_VALUE | (irr ? EDGE_IRREDUCIBLE_LOOP : 0)); + make_edge (new_bb, old_dest, + EDGE_FALSE_VALUE | (irr ? EDGE_IRREDUCIBLE_LOOP : 0)); + then_old_edge = make_edge (then_bb, old_dest, + EDGE_FALLTHRU | (irr ? EDGE_IRREDUCIBLE_LOOP : 0)); set_immediate_dominator (CDI_DOMINATORS, then_bb, new_bb); |