diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-11-29 03:34:17 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-11-29 03:34:17 +0000 |
commit | 39b5c0c049a19c7a7feffc9506da07923cc136e4 (patch) | |
tree | 40e2fe5414f9c051805e7fcd282a671e844e8fbd /lib/CodeGen/RegAllocFast.cpp | |
parent | e26e8a64ab37e98c69801ac2028b187773bc1d1f (diff) |
Use MCPhysReg for RegisterClassInfo allocation orders.
This saves a bit of memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocFast.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocFast.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAllocFast.cpp b/lib/CodeGen/RegAllocFast.cpp index 88922169b3..db79284d24 100644 --- a/lib/CodeGen/RegAllocFast.cpp +++ b/lib/CodeGen/RegAllocFast.cpp @@ -527,10 +527,10 @@ RAFast::LiveRegMap::iterator RAFast::allocVirtReg(MachineInstr *MI, } } - ArrayRef<unsigned> AO = RegClassInfo.getOrder(RC); + ArrayRef<MCPhysReg> AO = RegClassInfo.getOrder(RC); // First try to find a completely free register. - for (ArrayRef<unsigned>::iterator I = AO.begin(), E = AO.end(); I != E; ++I) { + for (ArrayRef<MCPhysReg>::iterator I = AO.begin(), E = AO.end(); I != E; ++I){ unsigned PhysReg = *I; if (PhysRegState[PhysReg] == regFree && !UsedInInstr.count(PhysReg)) { assignVirtToPhysReg(*LRI, PhysReg); @@ -542,7 +542,7 @@ RAFast::LiveRegMap::iterator RAFast::allocVirtReg(MachineInstr *MI, << RC->getName() << "\n"); unsigned BestReg = 0, BestCost = spillImpossible; - for (ArrayRef<unsigned>::iterator I = AO.begin(), E = AO.end(); I != E; ++I) { + for (ArrayRef<MCPhysReg>::iterator I = AO.begin(), E = AO.end(); I != E; ++I){ unsigned Cost = calcSpillCost(*I); DEBUG(dbgs() << "\tRegister: " << PrintReg(*I, TRI) << "\n"); DEBUG(dbgs() << "\tCost: " << Cost << "\n"); |