On 25.02.2014 13:14, Andreas Schwab wrote:
Andrey Belevantsev <a...@ispras.ru> writes:
Fixed by placing the initialization properly at the end of sched_rgn_init
and also moving the check for sched_pressure != NONE outside of the if
statement in schedule_region as discussed in the PR trail with Jakub.
Bootstrapped and tested on x86-64, ok?
This breaks m68k:
$ gcc/xgcc -Bgcc/ -fno-diagnostics-show-caret -fdiagnostics-color=never -O0
-flive-range-shrinkage -c -o pr60268.o
../gcc/testsuite/gcc.c-torture/compile/pr60268.c
../gcc/testsuite/gcc.c-torture/compile/pr60268.c: In function âfâ:
../gcc/testsuite/gcc.c-torture/compile/pr60268.c:6:1: internal compiler error:
in m68k_sched_issue_rate, at config/m68k/m68k.c:5978
The patch itself has nothing to do with the ICE, probably it means that
-flive-range-shrinkage was never tried without tuning on m68k, because in
m68k.c there is
630 /* Setup scheduling options. */
631 if (TUNE_CFV1)
632 m68k_sched_cpu = CPU_CFV1;
633 else if (TUNE_CFV2)
634 m68k_sched_cpu = CPU_CFV2;
635 else if (TUNE_CFV3)
636 m68k_sched_cpu = CPU_CFV3;
637 else if (TUNE_CFV4)
638 m68k_sched_cpu = CPU_CFV4;
639 else
640 {
641 m68k_sched_cpu = CPU_UNKNOWN;
642 flag_schedule_insns = 0;
643 flag_schedule_insns_after_reload = 0;
644 flag_modulo_sched = 0;
645 }
And on line 641 m68k_sched_cpu set to CPU_UNKNOWN is causing the ICE.
I guess you need to turn the live range shrinkage off in that piece of
code, the below patch fixes the ICE for me:
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index f20d071..ea1bcd4 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -642,6 +642,7 @@ m68k_option_override (void)
flag_schedule_insns = 0;
flag_schedule_insns_after_reload = 0;
flag_modulo_sched = 0;
+ flag_live_range_shrinkage = 0;
}
if (m68k_sched_cpu != CPU_UNKNOWN)
Yours,
Andrey
0xbabc8b m68k_sched_issue_rate
../../gcc/config/m68k/m68k.c:5978
0xc3d9dc sched_init()
../../gcc/haifa-sched.c:6657
0xc3eecf haifa_sched_init()
../../gcc/haifa-sched.c:6719
0x8e807c schedule_insns
../../gcc/sched-rgn.c:3407
0x8e87cb schedule_insns
../../gcc/sched-rgn.c:3401
0x8e87cb rest_of_handle_live_range_shrinkage
../../gcc/sched-rgn.c:3614
0x8e87cb execute
../../gcc/sched-rgn.c:3704
Andreas.