mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
LSR wants to split the landing pad's critical edge. Let it do it, but use the
proper function to do it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138550 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3625,7 +3625,14 @@ void LSRInstance::RewriteForPHI(PHINode *PN,
|
||||
Loop *PNLoop = LI.getLoopFor(Parent);
|
||||
if (!PNLoop || Parent != PNLoop->getHeader()) {
|
||||
// Split the critical edge.
|
||||
BasicBlock *NewBB = SplitCriticalEdge(BB, Parent, P);
|
||||
BasicBlock *NewBB = 0;
|
||||
if (!Parent->isLandingPad()) {
|
||||
NewBB = SplitCriticalEdge(BB, Parent, P);
|
||||
} else {
|
||||
SmallVector<BasicBlock*, 2> NewBBs;
|
||||
SplitLandingPadPredecessors(Parent, BB, "", "", P, NewBBs);
|
||||
NewBB = NewBBs[0];
|
||||
}
|
||||
|
||||
// If PN is outside of the loop and BB is in the loop, we want to
|
||||
// move the block to be immediately before the PHI block, not
|
||||
|
Reference in New Issue
Block a user