summaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/GVN.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-09-03 15:34:35 +0000
committerDan Gohman <gohman@apple.com>2009-09-03 15:34:35 +0000
commitbccfc24c4e8092e1ee18746dd4cee01247728faa (patch)
treebf1ea31f55e271210a43862a4fe5c64749b8c796 /lib/Transforms/Scalar/GVN.cpp
parentdd12de686cb0a3bcff879ae895fe461caa6f7842 (diff)
downloadexternal_llvm-bccfc24c4e8092e1ee18746dd4cee01247728faa.zip
external_llvm-bccfc24c4e8092e1ee18746dd4cee01247728faa.tar.gz
external_llvm-bccfc24c4e8092e1ee18746dd4cee01247728faa.tar.bz2
Change PHINode::hasConstantValue to have a DominatorTree argument
instead of a bool argument, and to do the dominator check itself. This makes it eaiser to use when DominatorTree information is available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/GVN.cpp')
-rw-r--r--lib/Transforms/Scalar/GVN.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp
index 56bc816c..36c90f5 100644
--- a/lib/Transforms/Scalar/GVN.cpp
+++ b/lib/Transforms/Scalar/GVN.cpp
@@ -769,7 +769,7 @@ static bool isSafeReplacement(PHINode* p, Instruction* inst) {
}
Value* GVN::CollapsePhi(PHINode* p) {
- Value* constVal = p->hasConstantValue();
+ Value* constVal = p->hasConstantValue(DT);
if (!constVal) return 0;
Instruction* inst = dyn_cast<Instruction>(constVal);