[llvm-commits] [llvm] r133313 - /llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Jun 17 16:26:52 PDT 2011


Author: stoklund
Date: Fri Jun 17 18:26:52 2011
New Revision: 133313

URL: http://llvm.org/viewvc/llvm-project?rev=133313&view=rev
Log:
Only call TRI::getRawAllocationOrder to resolve a target-dependent hint.

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=133313&r1=133312&r2=133313&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Fri Jun 17 18:26:52 2011
@@ -1440,8 +1440,12 @@
   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.





More information about the llvm-commits mailing list