PM->add(createLoopUnrollPass()); // Unroll small loops
PM->add(createInstructionCombiningPass()); // Clean up after the unroller
if (OptimizationLevel > 1)
PM->add(createLoopUnrollPass()); // Unroll small loops
PM->add(createInstructionCombiningPass()); // Clean up after the unroller
if (OptimizationLevel > 1)
- PM->add(createGVNPass(OptimizationLevel > 2)); // Remove redundancies
+ PM->add(createGVNPass()); // Remove redundancies
PM->add(createMemCpyOptPass()); // Remove memcpy / form memset
PM->add(createSCCPPass()); // Constant prop with SCCP
PM->add(createMemCpyOptPass()); // Remove memcpy / form memset
PM->add(createSCCPPass()); // Constant prop with SCCP
// GVN - This pass performs global value numbering and redundant load
// elimination cotemporaneously.
//
// GVN - This pass performs global value numbering and redundant load
// elimination cotemporaneously.
//
-FunctionPass *createGVNPass(bool EnableFullLoadPRE = true,
- bool NoLoads = false);
+FunctionPass *createGVNPass(bool NoLoads = false);
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
//
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> 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
//===----------------------------------------------------------------------===//
// ValueTable Class
bool runOnFunction(Function &F);
public:
static char ID; // Pass identification, replacement for typeid
bool runOnFunction(Function &F);
public:
static char ID; // Pass identification, replacement for typeid
- explicit GVN(bool fullloadpre = true, bool noloads = false)
- : FunctionPass(&ID), EnableFullLoadPRE(fullloadpre),
- NoLoads(noloads), MD(0) { }
+ explicit GVN(bool noloads = false)
+ : FunctionPass(&ID), NoLoads(noloads), MD(0) { }
- bool EnableFullLoadPRE;
bool NoLoads;
MemoryDependenceAnalysis *MD;
DominatorTree *DT;
bool NoLoads;
MemoryDependenceAnalysis *MD;
DominatorTree *DT;
}
// createGVNPass - The public interface to this file...
}
// createGVNPass - The public interface to this file...
-FunctionPass *llvm::createGVNPass(bool EnableFullLoadPRE, bool NoLoads) {
- return new GVN(EnableFullLoadPRE, NoLoads);
+FunctionPass *llvm::createGVNPass(bool NoLoads) {
+ return new GVN(NoLoads);
}
static RegisterPass<GVN> X("gvn",
}
static RegisterPass<GVN> X("gvn",