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 | 2684ddd72e6274be60129d5510d9d5073463d0a4 (patch) | |
tree | 8a1cc576fcd316c88e1fee0e28357f23c0a1d5c0 /lib/Transforms/Vectorize/BBVectorize.cpp | |
parent | b725815069b6682f2371dc5da00d1dd85365aa7a (diff) | |
download | llvm-2684ddd72e6274be60129d5510d9d5073463d0a4.tar.gz llvm-2684ddd72e6274be60129d5510d9d5073463d0a4.tar.bz2 llvm-2684ddd72e6274be60129d5510d9d5073463d0a4.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize/BBVectorize.cpp')
-rw-r--r-- | lib/Transforms/Vectorize/BBVectorize.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Vectorize/BBVectorize.cpp b/lib/Transforms/Vectorize/BBVectorize.cpp index ffbf81b942..0cc1f3962a 100644 --- a/lib/Transforms/Vectorize/BBVectorize.cpp +++ b/lib/Transforms/Vectorize/BBVectorize.cpp @@ -388,6 +388,8 @@ namespace { void combineMetadata(Instruction *K, const Instruction *J); bool vectorizeBB(BasicBlock &BB) { + if (skipOptnoneFunction(BB)) + return false; if (!DT->isReachableFromEntry(&BB)) { DEBUG(dbgs() << "BBV: skipping unreachable " << BB.getName() << " in " << BB.getParent()->getName() << "\n"); @@ -429,6 +431,8 @@ namespace { } virtual bool runOnBasicBlock(BasicBlock &BB) { + // OptimizeNone check deferred to vectorizeBB(). + AA = &getAnalysis<AliasAnalysis>(); DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); SE = &getAnalysis<ScalarEvolution>(); |