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
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 @@
 }
 
 Value* GVN::CollapsePhi(PHINode* p) {
-  Value* constVal = p->hasConstantValue();
+  Value* constVal = p->hasConstantValue(DT);
   if (!constVal) return 0;
   
   Instruction* inst = dyn_cast<Instruction>(constVal);