mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-28 00:40:54 +00:00
Use modern API to avoid exposing LiveInterval internals.
No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185733 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f2415efc3
commit
202eb7b18e
@ -743,16 +743,14 @@ bool RegisterCoalescer::reMaterializeTrivialDef(CoalescerPair &CP,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
LiveInterval &SrcInt = LIS->getInterval(SrcReg);
|
LiveInterval &SrcInt = LIS->getInterval(SrcReg);
|
||||||
SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot(true);
|
SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI);
|
||||||
LiveInterval::iterator SrcLR = SrcInt.FindLiveRangeContaining(CopyIdx);
|
VNInfo *ValNo = LiveRangeQuery(SrcInt, CopyIdx).valueIn();
|
||||||
assert(SrcLR != SrcInt.end() && "Live range not found!");
|
assert(ValNo && "CopyMI input register not live");
|
||||||
VNInfo *ValNo = SrcLR->valno;
|
|
||||||
if (ValNo->isPHIDef() || ValNo->isUnused())
|
if (ValNo->isPHIDef() || ValNo->isUnused())
|
||||||
return false;
|
return false;
|
||||||
MachineInstr *DefMI = LIS->getInstructionFromIndex(ValNo->def);
|
MachineInstr *DefMI = LIS->getInstructionFromIndex(ValNo->def);
|
||||||
if (!DefMI)
|
if (!DefMI)
|
||||||
return false;
|
return false;
|
||||||
assert(DefMI && "Defining instruction disappeared");
|
|
||||||
if (DefMI->isCopyLike()) {
|
if (DefMI->isCopyLike()) {
|
||||||
IsDefCopy = true;
|
IsDefCopy = true;
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user