mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-22 03:58:16 +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,6 +253,7 @@ 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()) {
|
||||||
|
if (AA) AA->deleteValue(PN);
|
||||||
PN->replaceAllUsesWith(V);
|
PN->replaceAllUsesWith(V);
|
||||||
PN->eraseFromParent();
|
PN->eraseFromParent();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user