diff options
author | Paul Robinson <paul_robinson@playstation.sony.com> | 2014-03-31 17:43:35 +0000 |
---|---|---|
committer | Paul Robinson <paul_robinson@playstation.sony.com> | 2014-03-31 17:43:35 +0000 |
commit | 5fa58a5b232be0b8261041a651ed1be3ae8d3848 (patch) | |
tree | d0a611cc58c2a47e14b47d6f709b765379bd4ac8 /lib/CodeGen/MachineScheduler.cpp | |
parent | b6f3f9ba45d33bd52ececdda05f018c621fa9c6a (diff) | |
download | llvm-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.cpp | 3 |
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. |