mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
- Only perform the unfolding optimization when the folding in question is modref.
- Remove a bogus assertion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43211 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d958a5a9fe
commit
cbfb9b27ef
@ -821,11 +821,8 @@ bool LocalSpiller::PrepForUnfoldOpti(MachineBasicBlock &MBB,
|
||||
unsigned Idx = NewMI->findRegisterUseOperandIdx(VirtReg);
|
||||
MachineInstr *FoldedMI = MRI->foldMemoryOperand(NewMI, Idx, SS);
|
||||
if (FoldedMI) {
|
||||
if (VRM.hasPhys(UnfoldVR))
|
||||
assert(VRM.getPhys(UnfoldVR) == UnfoldPR);
|
||||
else
|
||||
if (!VRM.hasPhys(UnfoldVR))
|
||||
VRM.assignVirt2Phys(UnfoldVR, UnfoldPR);
|
||||
|
||||
VRM.virtFolded(VirtReg, FoldedMI, VirtRegMap::isRef);
|
||||
MII = MBB.insert(MII, FoldedMI);
|
||||
VRM.RemoveFromFoldedVirtMap(&MI);
|
||||
@ -1190,7 +1187,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
|
||||
if (DeadStore) {
|
||||
bool isDead = !(MR & VirtRegMap::isRef);
|
||||
MachineInstr *NewStore = NULL;
|
||||
if (MR & VirtRegMap::isMod) {
|
||||
if (MR & VirtRegMap::isModRef) {
|
||||
unsigned PhysReg = Spills.getSpillSlotOrReMatPhysReg(SS);
|
||||
SmallVector<MachineInstr*, 4> NewMIs;
|
||||
if (PhysReg &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user