Tweak to ignoring reserved regs. The allocator was occasionally still looking

at them since they'd end up in the register weights list. Tell it to stop
doing that.

llvm-svn: 112756
This commit is contained in:
Jim Grosbach 2010-09-01 22:48:34 +00:00
parent 092d3467bc
commit 63a8eaf559
1 changed files with 4 additions and 2 deletions

View File

@ -1147,9 +1147,11 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur) {
e = RC->allocation_order_end(*mf_); i != e; ++i) {
unsigned reg = *i;
float regWeight = SpillWeights[reg];
// Don't even consider reserved regs.
if (reservedRegs_.test(reg))
continue;
// Skip recently allocated registers and reserved registers.
if (minWeight > regWeight && !isRecentlyUsed(reg) &&
!reservedRegs_.test(reg))
if (minWeight > regWeight && !isRecentlyUsed(reg))
Found = true;
RegsWeights.push_back(std::make_pair(reg, regWeight));
}