[Bug rtl-optimization/46649] [4.6 Regression] ICE: in move_bb_info, at sel-sched-ir.c:5080 with -fschedule-insns -fselective-scheduling
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 14 13:28:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46649
--- Comment #6 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-12-14 13:28:06 UTC ---
Even though it is possible to unbreak
purge_empty_blocks/maybe_tidy_empty_bb/sel_merge_blocks for this case, I think
it's not worth it given that sel-sched generally expects somewhat clean CFG.
So, just cleanup CFG at -O0.
I'll submit the following patch in a moment.
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 3b5603c..5fe9ccb 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -7648,6 +7648,11 @@ run_selective_scheduling (void)
if (n_basic_blocks == NUM_FIXED_BLOCKS)
return;
+ /* Drop empty basic blocks, unreachable code, etc. if the scheduler is
+ invoked at -O0. */
+ if (!optimize)
+ cleanup_cfg (0);
+
sel_global_init ();
for (rgn = 0; rgn < nr_regions; rgn++)
More information about the Gcc-bugs
mailing list