Expunge a bunch of uses of DomSet from LoopSimplify. Many more remain.
authorOwen Anderson <resistor@mac.com>
Sat, 7 Apr 2007 04:37:14 +0000 (04:37 +0000)
committerOwen Anderson <resistor@mac.com>
Sat, 7 Apr 2007 04:37:14 +0000 (04:37 +0000)
This is the beginning of work for PR1171.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35720 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/LoopSimplify.cpp

index 044ca5b0fc33bf1825b15c5dba4506ebf5631ca0..b6c262cd491cdfc1e8c7630d29889a732884d89c 100644 (file)
@@ -314,7 +314,7 @@ BasicBlock *LoopSimplify::SplitBlockPredecessors(BasicBlock *BB,
       // Can we eliminate this phi node now?
       if (Value *V = PN->hasConstantValue(true)) {
         if (!isa<Instruction>(V) ||
-            getAnalysis<DominatorSet>().dominates(cast<Instruction>(V), PN)) {
+            getAnalysis<ETForest>().dominates(cast<Instruction>(V), PN)) {
           PN->replaceAllUsesWith(V);
           if (AA) AA->deleteValue(PN);
           BB->getInstList().erase(PN);
@@ -542,10 +542,9 @@ Loop *LoopSimplify::SeparateNestedLoop(Loop *L) {
 
   // Determine which blocks should stay in L and which should be moved out to
   // the Outer loop now.
-  DominatorSet &DS = getAnalysis<DominatorSet>();
   std::set<BasicBlock*> BlocksInL;
   for (pred_iterator PI = pred_begin(Header), E = pred_end(Header); PI!=E; ++PI)
-    if (DS.dominates(Header, *PI))
+    if (EF->dominates(Header, *PI))
       AddBlockAndPredsToSet(*PI, Header, BlocksInL);