mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-22 12:08:33 +00:00
LoopSimplify preserves AA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52053 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8fb6a94b69
commit
4c37c07ee3
@ -73,6 +73,7 @@ namespace {
|
|||||||
AU.addPreserved<LoopInfo>();
|
AU.addPreserved<LoopInfo>();
|
||||||
AU.addPreserved<DominatorTree>();
|
AU.addPreserved<DominatorTree>();
|
||||||
AU.addPreserved<DominanceFrontier>();
|
AU.addPreserved<DominanceFrontier>();
|
||||||
|
AU.addPreserved<AliasAnalysis>();
|
||||||
AU.addPreservedID(BreakCriticalEdgesID); // No critical edges added.
|
AU.addPreservedID(BreakCriticalEdgesID); // No critical edges added.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,9 +253,10 @@ ReprocessLoop:
|
|||||||
for (BasicBlock::iterator I = L->getHeader()->begin();
|
for (BasicBlock::iterator I = L->getHeader()->begin();
|
||||||
(PN = dyn_cast<PHINode>(I++)); )
|
(PN = dyn_cast<PHINode>(I++)); )
|
||||||
if (Value *V = PN->hasConstantValue()) {
|
if (Value *V = PN->hasConstantValue()) {
|
||||||
PN->replaceAllUsesWith(V);
|
if (AA) AA->deleteValue(PN);
|
||||||
PN->eraseFromParent();
|
PN->replaceAllUsesWith(V);
|
||||||
}
|
PN->eraseFromParent();
|
||||||
|
}
|
||||||
|
|
||||||
return Changed;
|
return Changed;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user