1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00

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 e7c3ecd9dd
commit 9df54659d3

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));
}