[llvm-commits] [llvm] r52506 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Owen Anderson
resistor at mac.com
Thu Jun 19 12:57:25 PDT 2008
Author: resistor
Date: Thu Jun 19 14:57:25 2008
New Revision: 52506
URL: http://llvm.org/viewvc/llvm-project?rev=52506&view=rev
Log:
Add a hidden -disable-pre flag for testing purposes. This should be removed
once benchmarking is completed.
Modified:
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=52506&r1=52505&r2=52506&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Thu Jun 19 14:57:25 2008
@@ -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(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
//===----------------------------------------------------------------------===//
@@ -1285,7 +1289,9 @@
for (df_iterator<DomTreeNode*> DI = df_begin(DT.getRootNode()),
DE = df_end(DT.getRootNode()); DI != DE; ++DI)
changed |= processBlock(*DI);
-
- changed |= performPRE(F);
+
+ if (!DisablePRE)
+ changed |= performPRE(F);
+
return changed;
}
More information about the llvm-commits
mailing list