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

lib/Transforms/Scalar/GCSE.cpp

index d7194bb3d662e5a8f75775b85bed68bad4764611..93ed8c4fa9c663443407eb93222dfb91619e7143 100644 (file)
@@ -48,7 +48,6 @@ namespace {
     // This transformation requires dominator and immediate dominator info
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.setPreservesCFG();
-      AU.addRequired<ETForest>();
       AU.addRequired<DominatorTree>();
       AU.addRequired<ValueNumbering>();
     }
@@ -69,7 +68,6 @@ bool GCSE::runOnFunction(Function &F) {
 
   // Get pointers to the analysis results that we will be using...
   DominatorTree &DT = getAnalysis<DominatorTree>();
-  ETForest &ET = getAnalysis<ETForest>();
   ValueNumbering &VN = getAnalysis<ValueNumbering>();
 
   std::vector<Value*> EqualValues;
@@ -145,7 +143,7 @@ bool GCSE::runOnFunction(Function &F) {
             if (OtherI->getParent() == BB)
               Dominates = BlockInsts.count(OtherI);
             else
-              Dominates = ET.dominates(OtherI->getParent(), BB);
+              Dominates = DT.dominates(OtherI->getParent(), BB);
 
             if (Dominates) {
               // Okay, we found an instruction with the same value as this one