summaryrefslogtreecommitdiff
path: root/gcc/bb-reorder.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-30 20:14:42 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-30 20:14:42 +0000
commit9f4ec746affbde185eedfc5de139e8617061bbe3 (patch)
tree175c0fc497121c92660a49b3a816d2a4d4d565f2 /gcc/bb-reorder.c
parentca03cf1b133d66eb978c68f6dbc345e9aabcba88 (diff)
downloadgcc-9f4ec746affbde185eedfc5de139e8617061bbe3.tar.gz
PR rtl-opt/61608
PR target/39284 * bb-reorder.c (pass_duplicate_computed_gotos::execute): Cleanup the cfg if there were any changes. * passes.def: Revert move of peephole2 after reorder_blocks; move duplicate_computed_gotos before peephole2. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212172 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r--gcc/bb-reorder.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 61b0caba8b8..cd68fee4d77 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -2520,13 +2520,20 @@ pass_duplicate_computed_gotos::execute (function *fun)
changed = true;
}
-done:
- /* Duplicating blocks above will redirect edges and may cause hot blocks
- previously reached by both hot and cold blocks to become dominated only
- by cold blocks. */
+ done:
if (changed)
- fixup_partitions ();
- cfg_layout_finalize ();
+ {
+ /* Duplicating blocks above will redirect edges and may cause hot
+ blocks previously reached by both hot and cold blocks to become
+ dominated only by cold blocks. */
+ fixup_partitions ();
+
+ /* Merge the duplicated blocks into predecessors, when possible. */
+ cfg_layout_finalize ();
+ cleanup_cfg (0);
+ }
+ else
+ cfg_layout_finalize ();
BITMAP_FREE (candidates);
return 0;