MI-Sched temporarily enabled on x86.

I'm briefly enabling the MachineScheduler pass for x86 tonight to collect information on any failures that may show up.

To properly enable the new scheduler, this hook is implemented in X86Subtarget:

  bool enableMachineScheduler() const LLVM_OVERRIDE { return true; }

The MachineScheduler pass itself can be enabled/disabled with -enable-misched=true/false. But most of the codegen changes result rather from moving to source-order SD scheduling and subsequent register coalescing decisions. This makes it extremely challenging to keep the unit tests functioning during the transition. So you'll see unit test churn when I flip the switch.

Later, sometime in July, I'll plan to make the permanent change for X86, with all unit tests switched over to source order scheduling. (I have some compile-time improvements to make first). Changing the default for ARM will follow shortly thereafter.


This is really cool. Is there a way to provide a flag to enable the whole
thing so that folks can help you test stuff in advance of making it the
default? (Yes, I'm volunteering. =D)

I’ll probably turn it off soon :wink:

If want the same behavior as the target hook you can use these flags:

-pre-RA-sched=source -join-globalcopies -enable-misched

Thanks for any testing! Bug reports would be great.


So far so good. I going to leave this on for a while unattended. If anyone has trouble testing, feel free to revert r184705.