MachineScheduler: Honor optnone functions in the pre-ra scheduler.

llvm-svn: 258363
This commit is contained in:
Chad Rosier 2016-01-20 22:38:25 +00:00
parent 55a7ae5cc7
commit 6338d7c390
2 changed files with 4 additions and 0 deletions

View File

@ -314,6 +314,9 @@ ScheduleDAGInstrs *PostMachineScheduler::createPostMachineScheduler() {
/// 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;

View File

@ -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'