mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Do not split edges to EH landing pads. It will cause code size explosion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66140 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -327,6 +327,12 @@ static void SplitEdgeNicely(TerminatorInst *TI, unsigned SuccNum,
|
||||
assert(isa<PHINode>(Dest->begin()) &&
|
||||
"This should only be called if Dest has a PHI!");
|
||||
|
||||
// Do not split edges to EH landing pads.
|
||||
if (InvokeInst *Invoke = dyn_cast<InvokeInst>(TI)) {
|
||||
if (Invoke->getSuccessor(1) == Dest)
|
||||
return;
|
||||
}
|
||||
|
||||
// As a hack, never split backedges of loops. Even though the copy for any
|
||||
// PHIs inserted on the backedge would be dead for exits from the loop, we
|
||||
// assume that the cost of *splitting* the backedge would be too high.
|
||||
|
Reference in New Issue
Block a user