1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

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

llvm-svn: 133313
This commit is contained in:
Jakob Stoklund Olesen 2011-06-17 23:26:52 +00:00
parent fb9f0e74cf
commit 8c156f19ec

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.