forked from OSchip/llvm-project
Add a hidden -disable-pre flag for testing purposes. This should be removed
once benchmarking is completed. llvm-svn: 52506
This commit is contained in:
parent
fdf9f168b5
commit
e780d66657
|
@ -32,6 +32,7 @@
|
|||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
|
||||
#include "llvm/Support/CFG.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
|
@ -41,6 +42,9 @@ STATISTIC(NumGVNInstr, "Number of instructions deleted");
|
|||
STATISTIC(NumGVNLoad, "Number of loads deleted");
|
||||
STATISTIC(NumGVNPRE, "Number of instructions PRE'd");
|
||||
|
||||
static cl::opt<bool> DisablePRE("disable-pre",
|
||||
cl::init(false), cl::Hidden);
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// ValueTable Class
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -1286,6 +1290,8 @@ bool GVN::iterateOnFunction(Function &F) {
|
|||
DE = df_end(DT.getRootNode()); DI != DE; ++DI)
|
||||
changed |= processBlock(*DI);
|
||||
|
||||
changed |= performPRE(F);
|
||||
if (!DisablePRE)
|
||||
changed |= performPRE(F);
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue