[llvm-commits] [llvm] r85609 - in /llvm/trunk: include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/GVN.cpp
Evan Cheng
evan.cheng at apple.com
Fri Oct 30 13:12:24 PDT 2009
Author: evancheng
Date: Fri Oct 30 15:12:24 2009
New Revision: 85609
URL: http://llvm.org/viewvc/llvm-project?rev=85609&view=rev
Log:
Add option to createGVNPass to disable PRE.
Modified:
llvm/trunk/include/llvm/Transforms/Scalar.h
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Modified: llvm/trunk/include/llvm/Transforms/Scalar.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar.h?rev=85609&r1=85608&r2=85609&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Scalar.h (original)
+++ llvm/trunk/include/llvm/Transforms/Scalar.h Fri Oct 30 15:12:24 2009
@@ -271,7 +271,7 @@
// GVN - This pass performs global value numbering and redundant load
// elimination cotemporaneously.
//
-FunctionPass *createGVNPass();
+FunctionPass *createGVNPass(bool NoPRE = false);
//===----------------------------------------------------------------------===//
//
Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=85609&r1=85608&r2=85609&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Fri Oct 30 15:12:24 2009
@@ -669,9 +669,10 @@
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 @@
}
// 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");
More information about the llvm-commits
mailing list