[llvm-commits] [llvm] r112756 - /llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
Jim Grosbach
grosbach at apple.com
Wed Sep 1 15:48:34 PDT 2010
Author: grosbach
Date: Wed Sep 1 17:48:34 2010
New Revision: 112756
URL: http://llvm.org/viewvc/llvm-project?rev=112756&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=112756&r1=112755&r2=112756&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Wed Sep 1 17:48:34 2010
@@ -1147,9 +1147,11 @@
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));
}
More information about the llvm-commits
mailing list