diff options
author | Paul Robinson <paul_robinson@playstation.sony.com> | 2014-02-06 00:07:05 +0000 |
---|---|---|
committer | Paul Robinson <paul_robinson@playstation.sony.com> | 2014-02-06 00:07:05 +0000 |
commit | af4e64d0955aa47fd6e286ce48eeeed9a9ec7a4a (patch) | |
tree | f2a3ef5236ee396b9716402af3510a2b1073cc0e /llvm/lib/Transforms/Scalar/LoopDeletion.cpp | |
parent | f9e58778bc78a4a4714de0e8e66f70614ea28948 (diff) | |
download | llvm-af4e64d0955aa47fd6e286ce48eeeed9a9ec7a4a.zip llvm-af4e64d0955aa47fd6e286ce48eeeed9a9ec7a4a.tar.gz llvm-af4e64d0955aa47fd6e286ce48eeeed9a9ec7a4a.tar.bz2 |
Disable most IR-level transform passes on functions marked 'optnone'.
Ideally only those transform passes that run at -O0 remain enabled,
in reality we get as close as we reasonably can.
Passes are responsible for disabling themselves, it's not the job of
the pass manager to do it for them.
llvm-svn: 200892
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopDeletion.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopDeletion.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp index cae1253..b015545 100644 --- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp @@ -130,6 +130,9 @@ bool LoopDeletion::isLoopDead(Loop *L, /// NOTE: This entire process relies pretty heavily on LoopSimplify and LCSSA /// in order to make various safety checks work. bool LoopDeletion::runOnLoop(Loop *L, LPPassManager &LPM) { + if (skipOptnoneFunction(L)) + return false; + // We can only remove the loop if there is a preheader that we can // branch from after removing it. BasicBlock *preheader = L->getLoopPreheader(); |