mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +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<DominatorTree>();
|
||||
AU.addPreserved<DominanceFrontier>();
|
||||
AU.addPreserved<AliasAnalysis>();
|
||||
AU.addPreservedID(BreakCriticalEdgesID); // No critical edges added.
|
||||
}
|
||||
|
||||
@ -252,9 +253,10 @@ ReprocessLoop:
|
||||
for (BasicBlock::iterator I = L->getHeader()->begin();
|
||||
(PN = dyn_cast<PHINode>(I++)); )
|
||||
if (Value *V = PN->hasConstantValue()) {
|
||||
PN->replaceAllUsesWith(V);
|
||||
PN->eraseFromParent();
|
||||
}
|
||||
if (AA) AA->deleteValue(PN);
|
||||
PN->replaceAllUsesWith(V);
|
||||
PN->eraseFromParent();
|
||||
}
|
||||
|
||||
return Changed;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user