mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Added a size field to the stack map record to handle subregister spills.
Implementing this on bigendian platforms could get strange. I added a target hook, getStackSlotRange, per Jakob's recommendation to make this as explicit as possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194942 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1057,6 +1057,9 @@ foldMemoryOperand(ArrayRef<std::pair<MachineInstr*, unsigned> > Ops,
|
||||
bool WasCopy = MI->isCopy();
|
||||
unsigned ImpReg = 0;
|
||||
|
||||
bool SpillSubRegs = (MI->getOpcode() == TargetOpcode::PATCHPOINT ||
|
||||
MI->getOpcode() == TargetOpcode::STACKMAP);
|
||||
|
||||
// TargetInstrInfo::foldMemoryOperand only expects explicit, non-tied
|
||||
// operands.
|
||||
SmallVector<unsigned, 8> FoldOps;
|
||||
@@ -1068,7 +1071,7 @@ foldMemoryOperand(ArrayRef<std::pair<MachineInstr*, unsigned> > Ops,
|
||||
continue;
|
||||
}
|
||||
// FIXME: Teach targets to deal with subregs.
|
||||
if (MO.getSubReg())
|
||||
if (!SpillSubRegs && MO.getSubReg())
|
||||
return false;
|
||||
// We cannot fold a load instruction into a def.
|
||||
if (LoadMI && MO.isDef())
|
||||
|
||||
Reference in New Issue
Block a user