mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Turn off critical edge splitting for landing pads. The introduction of a
non-landing pad basic block as the successor to a block that ends in an unconditional jump will cause block folding to remove the added block as a successor. Thus eventually removing it AND the landing pad entirely. Critical edge splitting is an optimization, so we can safely turn it off when dealing with landing pads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
08ce53996e
commit
3de8249078
@ -83,8 +83,8 @@ bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &Fn) {
|
||||
for (LoweredPHIMap::iterator I = LoweredPHIs.begin(), E = LoweredPHIs.end();
|
||||
I != E; ++I)
|
||||
Fn.DeleteMachineInstr(I->first);
|
||||
LoweredPHIs.clear();
|
||||
|
||||
LoweredPHIs.clear();
|
||||
ImpDefs.clear();
|
||||
VRegPHIUseCount.clear();
|
||||
return Changed;
|
||||
@ -384,7 +384,8 @@ void llvm::PHIElimination::analyzePHINodes(const MachineFunction& Fn) {
|
||||
bool llvm::PHIElimination::SplitPHIEdges(MachineFunction &MF,
|
||||
MachineBasicBlock &MBB,
|
||||
LiveVariables &LV) {
|
||||
if (MBB.empty() || MBB.front().getOpcode() != TargetInstrInfo::PHI)
|
||||
if (MBB.empty() || MBB.front().getOpcode() != TargetInstrInfo::PHI ||
|
||||
MBB.isLandingPad())
|
||||
return false; // Quick exit for basic blocks without PHIs.
|
||||
|
||||
for (MachineBasicBlock::const_iterator BBI = MBB.begin(), BBE = MBB.end();
|
||||
|
@ -907,7 +907,7 @@ bool StrongPHIElimination::runOnMachineFunction(MachineFunction &Fn) {
|
||||
|
||||
// Determine which phi node operands need copies
|
||||
for (MachineFunction::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I)
|
||||
if (!I->empty() &&
|
||||
if (!I->empty() && !I->isLandingPad() &&
|
||||
I->begin()->getOpcode() == TargetInstrInfo::PHI)
|
||||
processBlock(I);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user