mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Add option to createGVNPass to disable PRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85609 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3efabd316f
commit
2f192c256c
@ -271,7 +271,7 @@ extern const PassInfo *const LCSSAID;
|
|||||||
// GVN - This pass performs global value numbering and redundant load
|
// GVN - This pass performs global value numbering and redundant load
|
||||||
// elimination cotemporaneously.
|
// elimination cotemporaneously.
|
||||||
//
|
//
|
||||||
FunctionPass *createGVNPass();
|
FunctionPass *createGVNPass(bool NoPRE = false);
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
|
@ -669,9 +669,10 @@ namespace {
|
|||||||
bool runOnFunction(Function &F);
|
bool runOnFunction(Function &F);
|
||||||
public:
|
public:
|
||||||
static char ID; // Pass identification, replacement for typeid
|
static char ID; // Pass identification, replacement for typeid
|
||||||
GVN() : FunctionPass(&ID) { }
|
GVN(bool nopre = false) : FunctionPass(&ID), NoPRE(nopre) { }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool NoPRE;
|
||||||
MemoryDependenceAnalysis *MD;
|
MemoryDependenceAnalysis *MD;
|
||||||
DominatorTree *DT;
|
DominatorTree *DT;
|
||||||
|
|
||||||
@ -710,7 +711,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// createGVNPass - The public interface to this file...
|
// 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",
|
static RegisterPass<GVN> X("gvn",
|
||||||
"Global Value Numbering");
|
"Global Value Numbering");
|
||||||
|
Loading…
Reference in New Issue
Block a user