On Tue, 24 Feb 2015, Yuri Rumyantsev wrote:
> Hi All! > > Here is a simple patch to not perform instruction reordering for > selective scheduling since it uses interface of list scheduling > defined in "sched-int.h". As I see, the exact problem is that swap_top_of_ready_list accesses HID, so please use the more specialized patch below instead. Thanks. Alexander diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7f5796a..6eccd54 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -26615,6 +26615,12 @@ swap_top_of_ready_list (rtx_insn **ready, int n_ready) dep_t dep; int clock1 = -1; int clock2 = -1; + + /* The following heuristic inspects h_i_d, but it is not extended for insns + created when doing selective scheduling. */ + if (sel_sched_p()) + return false; + #define INSN_TICK(INSN) (HID (INSN)->tick) if (!TARGET_SILVERMONT && !TARGET_INTEL)