diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2010-02-26 19:09:47 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2010-02-26 19:09:47 +0000 |
| commit | ed1b0c31a7e320d40d7472da058b29aa9136969d (patch) | |
| tree | fd344fd558ba3f442cda82bd672dded223697426 /llvm/lib/Transforms/Scalar | |
| parent | 5743d4d28095f352ae8f964edf6a225f5fff0035 (diff) | |
| download | bcm5719-llvm-ed1b0c31a7e320d40d7472da058b29aa9136969d.tar.gz bcm5719-llvm-ed1b0c31a7e320d40d7472da058b29aa9136969d.zip | |
Move the EnableFullLoadPRE flag from a separate command-line option to an
argument of createGVNPass and set it automatically for -O3.
llvm-svn: 97245
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index f7470c3c19e..c9a66fe6ec7 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/lib/Transforms/Scalar/GVN.cpp @@ -60,7 +60,6 @@ STATISTIC(NumPRELoad, "Number of loads PRE'd"); static cl::opt<bool> EnablePRE("enable-pre", cl::init(true), cl::Hidden); static cl::opt<bool> EnableLoadPRE("enable-load-pre", cl::init(true)); -static cl::opt<bool> EnableFullLoadPRE("enable-full-load-pre", cl::init(false)); //===----------------------------------------------------------------------===// // ValueTable Class @@ -662,10 +661,12 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - explicit GVN(bool noloads = false) - : FunctionPass(&ID), NoLoads(noloads), MD(0) { } + explicit GVN(bool fullloadpre = true, bool noloads = false) + : FunctionPass(&ID), EnableFullLoadPRE(fullloadpre), + NoLoads(noloads), MD(0) { } private: + bool EnableFullLoadPRE; bool NoLoads; MemoryDependenceAnalysis *MD; DominatorTree *DT; @@ -710,8 +711,8 @@ namespace { } // createGVNPass - The public interface to this file... -FunctionPass *llvm::createGVNPass(bool NoLoads) { - return new GVN(NoLoads); +FunctionPass *llvm::createGVNPass(bool EnableFullLoadPRE, bool NoLoads) { + return new GVN(EnableFullLoadPRE, NoLoads); } static RegisterPass<GVN> X("gvn", |

