mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
Add option to createGVNPass to disable PRE.
llvm-svn: 85609
This commit is contained in:
parent
52d6e56ac9
commit
8db8f72185
@ -271,7 +271,7 @@ extern const PassInfo *const LCSSAID;
|
||||
// GVN - This pass performs global value numbering and redundant load
|
||||
// elimination cotemporaneously.
|
||||
//
|
||||
FunctionPass *createGVNPass();
|
||||
FunctionPass *createGVNPass(bool NoPRE = false);
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user