[llvm] r258364 - MachineScheduler: Add a command line option to disable post scheduler.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 15:08:35 PST 2016
Author: mcrosier
Date: Wed Jan 20 17:08:32 2016
New Revision: 258364
URL: http://llvm.org/viewvc/llvm-project?rev=258364&view=rev
Log:
MachineScheduler: Add a command line option to disable post scheduler.
Modified:
llvm/trunk/lib/CodeGen/MachineScheduler.cpp
Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=258364&r1=258363&r2=258364&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Wed Jan 20 17:08:32 2016
@@ -219,6 +219,11 @@ static cl::opt<bool> EnableMachineSched(
cl::desc("Enable the machine instruction scheduling pass."), cl::init(true),
cl::Hidden);
+static cl::opt<bool> EnablePostRAMachineSched(
+ "enable-post-misched",
+ cl::desc("Enable the post-ra machine instruction scheduling pass."),
+ cl::init(true), cl::Hidden);
+
/// Forward declare the standard machine scheduler. This will be used as the
/// default scheduler if the target does not set a default.
static ScheduleDAGInstrs *createGenericSchedLive(MachineSchedContext *C);
@@ -355,7 +360,10 @@ bool PostMachineScheduler::runOnMachineF
if (skipOptnoneFunction(*mf.getFunction()))
return false;
- if (!mf.getSubtarget().enablePostRAScheduler()) {
+ if (EnablePostRAMachineSched.getNumOccurrences()) {
+ if (!EnablePostRAMachineSched)
+ return false;
+ } else if (!mf.getSubtarget().enablePostRAScheduler()) {
DEBUG(dbgs() << "Subtarget disables post-MI-sched.\n");
return false;
}
More information about the llvm-commits
mailing list