diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-06-17 23:26:52 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-06-17 23:26:52 +0000 |
| commit | becf3d3f292ef5721b756214bdc8829313964509 (patch) | |
| tree | c439767c2210be1ee2cfb9350b7f426ad327ab7d /llvm/lib/CodeGen/RegAllocLinearScan.cpp | |
| parent | 95a76f3715e2497facbf6e68da7477a46e92134f (diff) | |
| download | llvm-becf3d3f292ef5721b756214bdc8829313964509.zip llvm-becf3d3f292ef5721b756214bdc8829313964509.tar.gz llvm-becf3d3f292ef5721b756214bdc8829313964509.tar.bz2 | |
Only call TRI::getRawAllocationOrder to resolve a target-dependent hint.
llvm-svn: 133313
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocLinearScan.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp index 0818034..7a2ea6c 100644 --- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp +++ b/llvm/lib/CodeGen/RegAllocLinearScan.cpp @@ -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. |
