mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Update regunits in RegisterCoalescer::reMaterializeTrivialDef.
Old code would only update physreg live intervals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158881 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e3c9ccd312
commit
71b49cb5c7
@ -797,12 +797,10 @@ bool RegisterCoalescer::reMaterializeTrivialDef(LiveInterval &SrcInt,
|
||||
|
||||
SlotIndex NewMIIdx = LIS->getInstructionIndex(NewMI);
|
||||
for (unsigned i = 0, e = NewMIImplDefs.size(); i != e; ++i) {
|
||||
unsigned reg = NewMIImplDefs[i];
|
||||
LiveInterval &li = LIS->getInterval(reg);
|
||||
VNInfo *DeadDefVN = li.getNextValue(NewMIIdx.getRegSlot(),
|
||||
LIS->getVNInfoAllocator());
|
||||
LiveRange lr(NewMIIdx.getRegSlot(), NewMIIdx.getDeadSlot(), DeadDefVN);
|
||||
li.addRange(lr);
|
||||
unsigned Reg = NewMIImplDefs[i];
|
||||
for (MCRegUnitIterator Units(Reg, TRI); Units.isValid(); ++Units)
|
||||
if (LiveInterval *LI = LIS->getCachedRegUnit(*Units))
|
||||
LI->createDeadDef(NewMIIdx.getRegSlot(), LIS->getVNInfoAllocator());
|
||||
}
|
||||
|
||||
CopyMI->eraseFromParent();
|
||||
|
Loading…
Reference in New Issue
Block a user