mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Revert "Fix broken isCopy handling in TrimLiveIntervalToLastUse"
This reverts commit 107921. It broke the clang self host. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107926 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac0ed5dc08
commit
21e9445952
@ -618,14 +618,10 @@ SimpleRegisterCoalescing::TrimLiveIntervalToLastUse(SlotIndex CopyIdx,
|
||||
// of last use.
|
||||
LastUse->setIsKill();
|
||||
removeRange(li, LastUseIdx.getDefIndex(), LR->end, li_, tri_);
|
||||
if (LastUseMI->isCopy()) {
|
||||
MachineOperand &DefMO = LastUseMI->getOperand(0);
|
||||
if (DefMO.getReg() == li.reg && !DefMO.getSubReg())
|
||||
DefMO.setIsDead();
|
||||
}
|
||||
unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx;
|
||||
if (tii_->isMoveInstr(*LastUseMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) &&
|
||||
DstReg == li.reg && DstSubIdx == 0) {
|
||||
if ((LastUseMI->isCopy() && !LastUseMI->getOperand(0).getSubReg()) ||
|
||||
(tii_->isMoveInstr(*LastUseMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) &&
|
||||
DstReg == li.reg && DstSubIdx == 0)) {
|
||||
// Last use is itself an identity code.
|
||||
int DeadIdx = LastUseMI->findRegisterDefOperandIdx(li.reg,
|
||||
false, false, tri_);
|
||||
|
Loading…
Reference in New Issue
Block a user