diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2011-07-17 15:36:56 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2011-07-17 15:36:56 +0000 | 
| commit | 411bd29eea3c360d5b48a18a17b5e87f5671af0e (patch) | |
| tree | c8086addb211fa670a9d2b1038d8c2e453229755 /lib/CodeGen/RegisterClassInfo.cpp | |
| parent | 56fe8f14099930935e3870e3e823c322a85c1c89 (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/RegisterClassInfo.cpp')
| -rw-r--r-- | lib/CodeGen/RegisterClassInfo.cpp | 10 | 
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/RegisterClassInfo.cpp b/lib/CodeGen/RegisterClassInfo.cpp index 75b0c90be8fc..5a77e47bc591 100644 --- a/lib/CodeGen/RegisterClassInfo.cpp +++ b/lib/CodeGen/RegisterClassInfo.cpp @@ -81,11 +81,9 @@ void RegisterClassInfo::compute(const TargetRegisterClass *RC) const {    // FIXME: Once targets reserve registers instead of removing them from the    // allocation order, we can simply use begin/end here. -  TargetRegisterClass::iterator AOB = RC->allocation_order_begin(*MF); -  TargetRegisterClass::iterator AOE = RC->allocation_order_end(*MF); - -  for (TargetRegisterClass::iterator I = AOB; I != AOE; ++I) { -    unsigned PhysReg = *I; +  ArrayRef<unsigned> RawOrder = RC->getRawAllocationOrder(*MF); +  for (unsigned i = 0; i != RawOrder.size(); ++i) { +    unsigned PhysReg = RawOrder[i];      // Remove reserved registers from the allocation order.      if (Reserved.test(PhysReg))        continue; @@ -103,7 +101,7 @@ void RegisterClassInfo::compute(const TargetRegisterClass *RC) const {    DEBUG({      dbgs() << "AllocationOrder(" << RC->getName() << ") = ["; -    for (unsigned I = 0; I != N; ++I) +    for (unsigned I = 0; I != RCI.NumRegs; ++I)        dbgs() << ' ' << PrintReg(RCI.Order[I], TRI);      dbgs() << " ]\n";    });  | 
