diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-10-30 20:12:24 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-10-30 20:12:24 +0000 |
commit | 2f192c256c28f3b6c018f59e96380cd26f59c767 (patch) | |
tree | f78f39f43c28d84210560c5a1ad4b5f8fdd06b38 /lib | |
parent | 3efabd316f05c8c9f82a62424721532c474fc067 (diff) |
Add option to createGVNPass to disable PRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index dd8859b5e8..33ad4e1059 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -669,9 +669,10 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - GVN() : FunctionPass(&ID) { } + GVN(bool nopre = false) : FunctionPass(&ID), NoPRE(nopre) { } private: + bool NoPRE; MemoryDependenceAnalysis *MD; DominatorTree *DT; @@ -710,7 +711,7 @@ namespace { } // createGVNPass - The public interface to this file... -FunctionPass *llvm::createGVNPass() { return new GVN(); } +FunctionPass *llvm::createGVNPass(bool NoPRE) { return new GVN(NoPRE); } static RegisterPass<GVN> X("gvn", "Global Value Numbering"); |