[llvm] r258363 - MachineScheduler: Honor optnone functions in the pre-ra scheduler.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 14:38:26 PST 2016


Author: mcrosier
Date: Wed Jan 20 16:38:25 2016
New Revision: 258363

URL: http://llvm.org/viewvc/llvm-project?rev=258363&view=rev
Log:
MachineScheduler: Honor optnone functions in the pre-ra scheduler.

Modified:
    llvm/trunk/lib/CodeGen/MachineScheduler.cpp
    llvm/trunk/test/Feature/optnone-llc.ll

Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=258363&r1=258362&r2=258363&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Wed Jan 20 16:38:25 2016
@@ -314,6 +314,9 @@ ScheduleDAGInstrs *PostMachineScheduler:
 /// design would be to split blocks at scheduling boundaries, but LLVM has a
 /// general bias against block splitting purely for implementation simplicity.
 bool MachineScheduler::runOnMachineFunction(MachineFunction &mf) {
+  if (skipOptnoneFunction(*mf.getFunction()))
+    return false;
+
   if (EnableMachineSched.getNumOccurrences()) {
     if (!EnableMachineSched)
       return false;

Modified: llvm/trunk/test/Feature/optnone-llc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/optnone-llc.ll?rev=258363&r1=258362&r2=258363&view=diff
==============================================================================
--- llvm/trunk/test/Feature/optnone-llc.ll (original)
+++ llvm/trunk/test/Feature/optnone-llc.ll Wed Jan 20 16:38:25 2016
@@ -44,6 +44,7 @@ attributes #0 = { optnone noinline }
 ; LLC-Ox-DAG: Skipping pass 'Machine code sinking'
 ; LLC-Ox-DAG: Skipping pass 'Machine Common Subexpression Elimination'
 ; LLC-Ox-DAG: Skipping pass 'Machine Copy Propagation Pass'
+; LLC-Ox-DAG: Skipping pass 'Machine Instruction Scheduler'
 ; LLC-Ox-DAG: Skipping pass 'Machine Loop Invariant Code Motion'
 ; LLC-Ox-DAG: Skipping pass 'Merge disjoint stack slots'
 ; LLC-Ox-DAG: Skipping pass 'Optimize machine instruction PHIs'




More information about the llvm-commits mailing list