Zap the last reference to allocation_order_begin().
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 17 Jun 2011 23:17:13 +0000 (23:17 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 17 Jun 2011 23:17:13 +0000 (23:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133310 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/TargetRegisterInfo.cpp

index e36e136450471c62e0fb0c0b9b33af8d29b484ed..bae3343a850929a8338a1d7647b9e5ba52353f0e 100644 (file)
@@ -79,9 +79,9 @@ TargetRegisterInfo::getMinimalPhysRegClass(unsigned reg, EVT VT) const {
 /// registers for the specific register class.
 static void getAllocatableSetForRC(const MachineFunction &MF,
                                    const TargetRegisterClass *RC, BitVector &R){
-  for (TargetRegisterClass::iterator I = RC->allocation_order_begin(MF),
-         E = RC->allocation_order_end(MF); I != E; ++I)
-    R.set(*I);
+  ArrayRef<unsigned> Order = RC->getRawAllocationOrder(MF);
+  for (unsigned i = 0; i != Order.size(); ++i)
+    R.set(Order[i]);
 }
 
 BitVector TargetRegisterInfo::getAllocatableSet(const MachineFunction &MF,