From fc56f9d2843266a0d38f52b44ca5343604fccc2f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 30 Jun 2014 13:14:42 -0700 Subject: re PR rtl-optimization/61608 (FAIL: gcc.target/arm/epilog-1.c scan-assembler tests) 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. From-SVN: r212172 --- gcc/bb-reorder.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'gcc/bb-reorder.c') diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 61b0cab..cd68fee 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; -- cgit v1.1