How to make -enable-misched the default?

In order for our instruction itineraries to be considered by the instruction scheduler we seem to have to pass -enable-misched to llvm:

clang -O3 -mllvm -enable-misched -c some.c …

If -enable-misched isn’t included there it doesn’t seem to take our instruction itineraries into account.

What’s the best way to make ‘-enable-misched’ the default?


Override this function in your subtarget info.


   /// \brief True if the subtarget should run MachineScheduler after aggressive
   /// coalescing.
   /// This currently replaces the SelectionDAG scheduler with the "source" order
   /// scheduler (though see below for an option to turn this off and use the
   /// TargetLowering preference). It does not yet disable the postRA scheduler.
   virtual bool enableMachineScheduler() const;