mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-27 05:32:22 +00:00
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
This commit is contained in:
parent
f3a9e368f6
commit
d44008ae40
@ -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);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user