Only call TRI::getRawAllocationOrder to resolve a target-dependent hint.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133313 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2011-06-17 23:26:52 +00:00
parent 8936b94776
commit bed9711ca8

View File

@ -1440,8 +1440,12 @@ unsigned RALinScan::getFreePhysReg(LiveInterval* cur,
if (TargetRegisterInfo::isVirtualRegister(physReg) && vrm_->hasPhys(physReg))
physReg = vrm_->getPhys(physReg);
ArrayRef<unsigned> Order = tri_->getRawAllocationOrder(RC, Hint.first,
physReg, *mf_);
ArrayRef<unsigned> Order;
if (Hint.first)
Order = tri_->getRawAllocationOrder(RC, Hint.first, physReg, *mf_);
else
Order = RegClassInfo.getOrder(RC);
assert(!Order.empty() && "No allocatable register in this register class!");
// Scan for the first available register.