mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Fix a bug in dead spill slot elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47687 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -914,6 +914,7 @@ bool LocalSpiller::PrepForUnfoldOpti(MachineBasicBlock &MBB,
|
||||
Ops.push_back(Idx);
|
||||
MachineInstr *FoldedMI = TII->foldMemoryOperand(MF, NewMI, Ops, SS);
|
||||
if (FoldedMI) {
|
||||
VRM.addSpillSlotUse(SS, FoldedMI);
|
||||
if (!VRM.hasPhys(UnfoldVR))
|
||||
VRM.assignVirt2Phys(UnfoldVR, UnfoldPR);
|
||||
VRM.virtFolded(VirtReg, FoldedMI, VirtRegMap::isRef);
|
||||
@ -1414,6 +1415,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
|
||||
MBB.insert(MII, NewMIs[0]);
|
||||
NewStore = NewMIs[1];
|
||||
MBB.insert(MII, NewStore);
|
||||
VRM.addSpillSlotUse(SS, NewStore);
|
||||
VRM.RemoveMachineInstrFromMaps(&MI);
|
||||
MBB.erase(&MI);
|
||||
Erased = true;
|
||||
|
Reference in New Issue
Block a user