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:
Owen Anderson 2008-06-19 19:57:25 +00:00
parent fdf9f168b5
commit e780d66657
1 changed files with 8 additions and 2 deletions

View File

@ -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);
if (!DisablePRE)
changed |= performPRE(F);
return changed;
}