mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Undo PHI elimination copy placement patch. This causes coalescing (performace) issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e04f736545
commit
fc5423d561
@ -49,12 +49,6 @@ namespace {
|
||||
}
|
||||
|
||||
private:
|
||||
/// findInsertionPoint - Find a safe location to insert a move to copy
|
||||
/// source of a PHI instruction.
|
||||
MachineBasicBlock::iterator
|
||||
findInsertionPoint(MachineBasicBlock &MBB, MachineInstr *DefMI,
|
||||
unsigned DstReg, unsigned SrcReg) const;
|
||||
|
||||
/// EliminatePHINodes - Eliminate phi nodes by inserting copy instructions
|
||||
/// in predecessor basic blocks.
|
||||
///
|
||||
@ -132,28 +126,6 @@ bool PNE::EliminatePHINodes(MachineFunction &MF, MachineBasicBlock &MBB) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/// findInsertionPoint - Find a safe location to insert a move to copy
|
||||
/// source of a PHI instruction.
|
||||
MachineBasicBlock::iterator
|
||||
PNE::findInsertionPoint(MachineBasicBlock &MBB, MachineInstr *DefMI,
|
||||
unsigned DstReg, unsigned SrcReg) const {
|
||||
if (DefMI->getOpcode() == TargetInstrInfo::PHI ||
|
||||
DefMI->getParent() != &MBB)
|
||||
return MBB.getFirstTerminator();
|
||||
|
||||
for (MachineRegisterInfo::use_iterator I = MRI->use_begin(SrcReg),
|
||||
E = MRI->use_end(); I != E; ++I)
|
||||
if (I->getParent() == &MBB)
|
||||
return MBB.getFirstTerminator();
|
||||
for (MachineRegisterInfo::use_iterator I = MRI->use_begin(DstReg),
|
||||
E = MRI->use_end(); I != E; ++I)
|
||||
if (I->getParent() == &MBB)
|
||||
return MBB.getFirstTerminator();
|
||||
|
||||
MachineBasicBlock::iterator I = DefMI;
|
||||
return ++I;
|
||||
}
|
||||
|
||||
/// LowerAtomicPHINode - Lower the PHI node at the top of the specified block,
|
||||
/// under the assuption that it needs to be lowered in a way that supports
|
||||
/// atomic execution of PHIs. This lowering method is always correct all of the
|
||||
@ -242,8 +214,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
|
||||
|
||||
// Find a safe location to insert the copy, this may be the first
|
||||
// terminator in the block (or end()).
|
||||
MachineBasicBlock::iterator InsertPos =
|
||||
findInsertionPoint(opBlock, DefMI, IncomingReg, SrcReg);
|
||||
MachineBasicBlock::iterator InsertPos = opBlock.getFirstTerminator();
|
||||
|
||||
// Insert the copy.
|
||||
TII->copyRegToReg(opBlock, InsertPos, IncomingReg, SrcReg, RC, RC);
|
||||
|
Loading…
Reference in New Issue
Block a user