summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul_robinson@playstation.sony.com>2014-03-31 17:43:35 +0000
committerPaul Robinson <paul_robinson@playstation.sony.com>2014-03-31 17:43:35 +0000
commit5fa58a5b232be0b8261041a651ed1be3ae8d3848 (patch)
treed0a611cc58c2a47e14b47d6f709b765379bd4ac8 /lib/CodeGen/MachineScheduler.cpp
parentb6f3f9ba45d33bd52ececdda05f018c621fa9c6a (diff)
downloadllvm-5fa58a5b232be0b8261041a651ed1be3ae8d3848.tar.gz
llvm-5fa58a5b232be0b8261041a651ed1be3ae8d3848.tar.bz2
llvm-5fa58a5b232be0b8261041a651ed1be3ae8d3848.tar.xz
Disable each MachineFunctionPass for 'optnone' functions, unless that
pass normally runs at optimization level None, or is part of the register allocation pipeline. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--lib/CodeGen/MachineScheduler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineScheduler.cpp b/lib/CodeGen/MachineScheduler.cpp
index f99fc72e75..d90cd239e0 100644
--- a/lib/CodeGen/MachineScheduler.cpp
+++ b/lib/CodeGen/MachineScheduler.cpp
@@ -330,6 +330,9 @@ bool MachineScheduler::runOnMachineFunction(MachineFunction &mf) {
}
bool PostMachineScheduler::runOnMachineFunction(MachineFunction &mf) {
+ if (skipOptnoneFunction(*mf.getFunction()))
+ return false;
+
DEBUG(dbgs() << "Before post-MI-sched:\n"; mf.print(dbgs()));
// Initialize the context of the pass.