Use DominatorTree instead of ETForest.
authorDevang Patel <dpatel@apple.com>
Thu, 7 Jun 2007 18:40:55 +0000 (18:40 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 7 Jun 2007 18:40:55 +0000 (18:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37494 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/GCSE.cpp

index d9f57c486c4935ee7f50f354f70145cb62c0bab1..d7194bb3d662e5a8f75775b85bed68bad4764611 100644 (file)
@@ -68,9 +68,9 @@ bool GCSE::runOnFunction(Function &F) {
   bool Changed = false;
 
   // Get pointers to the analysis results that we will be using...
-  ETForest &EF = getAnalysis<ETForest>();
-  ValueNumbering &VN = getAnalysis<ValueNumbering>();
   DominatorTree &DT = getAnalysis<DominatorTree>();
+  ETForest &ET = getAnalysis<ETForest>();
+  ValueNumbering &VN = getAnalysis<ValueNumbering>();
 
   std::vector<Value*> EqualValues;
 
@@ -145,7 +145,7 @@ bool GCSE::runOnFunction(Function &F) {
             if (OtherI->getParent() == BB)
               Dominates = BlockInsts.count(OtherI);
             else
-              Dominates = EF.dominates(OtherI->getParent(), BB);
+              Dominates = ET.dominates(OtherI->getParent(), BB);
 
             if (Dominates) {
               // Okay, we found an instruction with the same value as this one