mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-23 01:25:32 +00:00
[PM] Now that LoopInfo isn't in the Pass type hierarchy, it is much
cleaner to derive from the generic base. Thise removes a ton of boiler plate code and somewhat strange and pointless indirections. It also remove a bunch of the previously needed friend declarations. To fully remove these, I also lifted the verify logic into the generic LoopInfoBase, which seems good anyways -- it is generic and useful logic even for the machine side. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226385 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -293,7 +293,7 @@ BasicBlock *llvm::SplitBlock(BasicBlock *Old, Instruction *SplitPt, Pass *P) {
|
||||
if (auto *LIWP = P->getAnalysisIfAvailable<LoopInfoWrapperPass>()) {
|
||||
LoopInfo &LI = LIWP->getLoopInfo();
|
||||
if (Loop *L = LI.getLoopFor(Old))
|
||||
L->addBasicBlockToLoop(New, LI.getBase());
|
||||
L->addBasicBlockToLoop(New, LI);
|
||||
}
|
||||
|
||||
if (DominatorTreeWrapperPass *DTWP =
|
||||
@@ -385,9 +385,9 @@ static void UpdateAnalysisInformation(BasicBlock *OldBB, BasicBlock *NewBB,
|
||||
}
|
||||
|
||||
if (InnermostPredLoop)
|
||||
InnermostPredLoop->addBasicBlockToLoop(NewBB, LI->getBase());
|
||||
InnermostPredLoop->addBasicBlockToLoop(NewBB, *LI);
|
||||
} else {
|
||||
L->addBasicBlockToLoop(NewBB, LI->getBase());
|
||||
L->addBasicBlockToLoop(NewBB, *LI);
|
||||
if (SplitMakesNewLoopHeader)
|
||||
L->moveToHeader(NewBB);
|
||||
}
|
||||
|
Reference in New Issue
Block a user