mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Fix a few more bugs:
1) Assign stack slots to new temporaries. 2) Don't insert an interval into the return vector more than once. llvm-svn: 54956
This commit is contained in:
parent
843bb4018c
commit
f7f555763d
@ -1608,7 +1608,7 @@ std::vector<LiveInterval*> LiveIntervals::
|
||||
addIntervalsForSpillsFast(const LiveInterval &li,
|
||||
const MachineLoopInfo *loopInfo,
|
||||
VirtRegMap &vrm, float& SSWeight) {
|
||||
vrm.assignVirt2StackSlot(li.reg);
|
||||
unsigned slot = vrm.assignVirt2StackSlot(li.reg);
|
||||
|
||||
std::vector<LiveInterval*> added;
|
||||
|
||||
@ -1631,9 +1631,13 @@ addIntervalsForSpillsFast(const LiveInterval &li,
|
||||
// Create a new virtual register for the spill interval.
|
||||
MachineOperand& MO = RI.getOperand();
|
||||
unsigned NewVReg = 0;
|
||||
bool newInt = false;
|
||||
if (!VRegMap.count(MO.getParent())) {
|
||||
VRegMap[MO.getParent()] = NewVReg = mri_->createVirtualRegister(rc);
|
||||
vrm.grow();
|
||||
vrm.assignVirt2StackSlot(NewVReg, slot);
|
||||
|
||||
newInt = true;
|
||||
} else
|
||||
NewVReg = VRegMap[MO.getParent()];
|
||||
|
||||
@ -1666,8 +1670,9 @@ addIntervalsForSpillsFast(const LiveInterval &li,
|
||||
DOUT << " +" << LR;
|
||||
nI.addRange(LR);
|
||||
}
|
||||
|
||||
added.push_back(&nI);
|
||||
|
||||
if (newInt)
|
||||
added.push_back(&nI);
|
||||
|
||||
DOUT << "\t\t\t\tadded new interval: ";
|
||||
DEBUG(nI.dump());
|
||||
|
Loading…
Reference in New Issue
Block a user