mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 02:32:11 +00:00
Restrict machine cse to really trivial coalescing. Leave the heavy lifting to a real coalescer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
57578766aa
commit
6c3b8ac6c9
@ -91,7 +91,10 @@ bool MachineCSE::PerformTrivialCoalescing(MachineInstr *MI,
|
|||||||
unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx;
|
unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx;
|
||||||
if (TII->isMoveInstr(*DefMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) &&
|
if (TII->isMoveInstr(*DefMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx) &&
|
||||||
TargetRegisterInfo::isVirtualRegister(SrcReg) &&
|
TargetRegisterInfo::isVirtualRegister(SrcReg) &&
|
||||||
|
MRI->getRegClass(SrcReg) == MRI->getRegClass(Reg) &&
|
||||||
!SrcSubIdx && !DstSubIdx) {
|
!SrcSubIdx && !DstSubIdx) {
|
||||||
|
DEBUG(dbgs() << "Coalescing: " << *DefMI);
|
||||||
|
DEBUG(dbgs() << "*** to: " << *MI);
|
||||||
MO.setReg(SrcReg);
|
MO.setReg(SrcReg);
|
||||||
DefMI->eraseFromParent();
|
DefMI->eraseFromParent();
|
||||||
++NumCoalesces;
|
++NumCoalesces;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user