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 | bdb55e0c59f4a1d168aebd826aa90647db8cc20d (patch) | |
tree | 996605577f661ef78cefc85254c2ec8ae01ff2d0 /llvm/lib/CodeGen/RegAllocFast.cpp | |
parent | fd41aee2f85891396ba7e0df939a2b96301bed80 (diff) | |
download | bcm5719-llvm-bdb55e0c59f4a1d168aebd826aa90647db8cc20d.tar.gz bcm5719-llvm-bdb55e0c59f4a1d168aebd826aa90647db8cc20d.zip |
Use MCPhysReg for RegisterClassInfo allocation orders.
This saves a bit of memory.
llvm-svn: 168852
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocFast.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocFast.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index 88922169b30..db79284d245 100644 --- a/llvm/lib/CodeGen/RegAllocFast.cpp +++ b/llvm/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"); |