[PATCH] D16367: Allow the -enable-misched command line option to control the post-ra MI scheduler as well.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 11:58:50 PST 2016
mcrosier created this revision.
mcrosier added a reviewer: atrick.
mcrosier added a subscriber: llvm-commits.
I'm also fine with creating a new option (e.g., -enable-postra-misched) that controls only the post-ra mi scheduler.
Also, I have a yet-to-be-submitted patch that requires this change to prevent a lit test from regressing.
Chad
http://reviews.llvm.org/D16367
Files:
lib/CodeGen/MachineScheduler.cpp
Index: lib/CodeGen/MachineScheduler.cpp
===================================================================
--- lib/CodeGen/MachineScheduler.cpp
+++ lib/CodeGen/MachineScheduler.cpp
@@ -349,12 +349,16 @@
}
bool PostMachineScheduler::runOnMachineFunction(MachineFunction &mf) {
- if (skipOptnoneFunction(*mf.getFunction()))
- return false;
-
- if (!mf.getSubtarget().enablePostRAScheduler()) {
- DEBUG(dbgs() << "Subtarget disables post-MI-sched.\n");
- return false;
+ if (EnableMachineSched.getNumOccurrences()) {
+ if (!EnableMachineSched)
+ return false;
+ } else {
+ if (skipOptnoneFunction(*mf.getFunction()))
+ return false;
+ if (!mf.getSubtarget().enablePostRAScheduler()) {
+ DEBUG(dbgs() << "Subtarget disables post-MI-sched.\n");
+ return false;
+ }
}
DEBUG(dbgs() << "Before post-MI-sched:\n"; mf.print(dbgs()));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16367.45428.patch
Type: text/x-patch
Size: 882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160120/72f8926f/attachment.bin>
More information about the llvm-commits
mailing list