This patch "fixes" PR rtl-optimization/54456 by running the first scheduling pass only when optimizing, as is already done for the second scheduling pass.
Tested on x86_64-suse-linux, applied on the mainline. 2012-09-04 Eric Botcazou <ebotca...@adacore.com> PR rtl-optimization/54456 * sched-rgn.c (gate_handle_sched): Return 1 only if optimize > 0. -- Eric Botcazou
Index: sched-rgn.c =================================================================== --- sched-rgn.c (revision 190863) +++ sched-rgn.c (working copy) @@ -3473,7 +3473,7 @@ static bool gate_handle_sched (void) { #ifdef INSN_SCHEDULING - return flag_schedule_insns && dbg_cnt (sched_func); + return optimize > 0 && flag_schedule_insns && dbg_cnt (sched_func); #else return 0; #endif