mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Account for early-clobber reload instructions.
No test case, there are no in-tree targets that require this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160219 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c8981f2e3d
commit
27982e1108
@ -1081,6 +1081,10 @@ void InlineSpiller::insertReload(LiveInterval &NewLI,
|
||||
MRI.getRegClass(NewLI.reg), &TRI);
|
||||
--MI; // Point to load instruction.
|
||||
SlotIndex LoadIdx = LIS.InsertMachineInstrInMaps(MI).getRegSlot();
|
||||
// Some (out-of-tree) targets have EC reload instructions.
|
||||
if (MachineOperand *MO = MI->findRegisterDefOperand(NewLI.reg))
|
||||
if (MO->isEarlyClobber())
|
||||
LoadIdx = LoadIdx.getRegSlot(true);
|
||||
DEBUG(dbgs() << "\treload: " << LoadIdx << '\t' << *MI);
|
||||
VNInfo *LoadVNI = NewLI.getNextValue(LoadIdx, LIS.getVNInfoAllocator());
|
||||
NewLI.addRange(LiveRange(LoadIdx, Idx, LoadVNI));
|
||||
|
Loading…
Reference in New Issue
Block a user