diff options
Diffstat (limited to 'gcc/tree-ssa-sink.c')
-rw-r--r-- | gcc/tree-ssa-sink.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index d33e56e..92f444e 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -398,7 +398,14 @@ statement_sink_location (gimple *stmt, basic_block frombb, && dominated_by_p (CDI_POST_DOMINATORS, commondom, bb) /* If the blocks are possibly within the same irreducible cycle the above check breaks down. */ - && !(bb->flags & commondom->flags & BB_IRREDUCIBLE_LOOP)) + && !((bb->flags & commondom->flags & BB_IRREDUCIBLE_LOOP) + && bb->loop_father == commondom->loop_father) + && !((commondom->flags & BB_IRREDUCIBLE_LOOP) + && flow_loop_nested_p (commondom->loop_father, + bb->loop_father)) + && !((bb->flags & BB_IRREDUCIBLE_LOOP) + && flow_loop_nested_p (bb->loop_father, + commondom->loop_father))) continue; bb = EDGE_PRED (bb, PHI_ARG_INDEX_FROM_USE (use_p))->src; } @@ -819,6 +826,7 @@ public: /* opt_pass methods: */ virtual bool gate (function *) { return flag_tree_sink != 0; } virtual unsigned int execute (function *); + opt_pass *clone (void) { return new pass_sink_code (m_ctxt); } }; // class pass_sink_code |