mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Local spiller kills a store if the folded restore is turned into a copy.
But this is incorrect if the spilled value live range extends beyond the current BB. It is currently controlled by a temporary option -spiller-check-liveout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28024 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -271,14 +271,15 @@ addIntervalsForSpills(const LiveInterval &li, VirtRegMap &vrm, int slot) {
|
||||
// can do this, we don't need to insert spill code.
|
||||
if (lv_)
|
||||
lv_->instructionChanged(MI, fmi);
|
||||
vrm.virtFolded(li.reg, MI, i, fmi);
|
||||
MachineBasicBlock &MBB = *MI->getParent();
|
||||
bool LiveOut = li.liveAt(getInstructionIndex(&MBB.back()) +
|
||||
InstrSlots::NUM);
|
||||
vrm.virtFolded(li.reg, MI, i, fmi, LiveOut);
|
||||
mi2iMap_.erase(MI);
|
||||
i2miMap_[index/InstrSlots::NUM] = fmi;
|
||||
mi2iMap_[fmi] = index;
|
||||
MachineBasicBlock &MBB = *MI->getParent();
|
||||
MI = MBB.insert(MBB.erase(MI), fmi);
|
||||
++numFolded;
|
||||
|
||||
// Folding the load/store can completely change the instruction in
|
||||
// unpredictable ways, rescan it from the beginning.
|
||||
goto for_operand;
|
||||
|
||||
Reference in New Issue
Block a user