From: Owen Anderson Date: Sat, 7 Apr 2007 04:37:14 +0000 (+0000) Subject: Expunge a bunch of uses of DomSet from LoopSimplify. Many more remain. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d44008ae4060a4e83981fa403a964723ec0351ba;p=oota-llvm.git Expunge a bunch of uses of DomSet from LoopSimplify. Many more remain. 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 --- diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 044ca5b0fc3..b6c262cd491 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -314,7 +314,7 @@ BasicBlock *LoopSimplify::SplitBlockPredecessors(BasicBlock *BB, // Can we eliminate this phi node now? if (Value *V = PN->hasConstantValue(true)) { if (!isa(V) || - getAnalysis().dominates(cast(V), PN)) { + getAnalysis().dominates(cast(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(); std::set 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);