mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
[PM] Split the LoopInfo object apart from the legacy pass, creating
a LoopInfoWrapperPass to wire the object up to the legacy pass manager. This switches all the clients of LoopInfo over and paves the way to port LoopInfo to the new pass manager. No functionality change is intended with this iteration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -48,7 +48,7 @@ namespace {
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
AU.addPreserved<DominatorTreeWrapperPass>();
|
||||
AU.addPreserved<LoopInfo>();
|
||||
AU.addPreserved<LoopInfoWrapperPass>();
|
||||
|
||||
// No loop canonicalization guarantees are broken by this pass.
|
||||
AU.addPreservedID(LoopSimplifyID);
|
||||
@@ -199,7 +199,8 @@ BasicBlock *llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum,
|
||||
DominatorTreeWrapperPass *DTWP =
|
||||
P->getAnalysisIfAvailable<DominatorTreeWrapperPass>();
|
||||
DominatorTree *DT = DTWP ? &DTWP->getDomTree() : nullptr;
|
||||
LoopInfo *LI = P->getAnalysisIfAvailable<LoopInfo>();
|
||||
auto *LIWP = P->getAnalysisIfAvailable<LoopInfoWrapperPass>();
|
||||
LoopInfo *LI = LIWP ? &LIWP->getLoopInfo() : nullptr;
|
||||
|
||||
// If we have nothing to update, just return.
|
||||
if (!DT && !LI)
|
||||
|
Reference in New Issue
Block a user