summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegisterClassInfo.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-11-29 03:34:17 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-11-29 03:34:17 +0000
commit39b5c0c049a19c7a7feffc9506da07923cc136e4 (patch)
tree40e2fe5414f9c051805e7fcd282a671e844e8fbd /lib/CodeGen/RegisterClassInfo.cpp
parente26e8a64ab37e98c69801ac2028b187773bc1d1f (diff)
downloadllvm-39b5c0c049a19c7a7feffc9506da07923cc136e4.tar.gz
llvm-39b5c0c049a19c7a7feffc9506da07923cc136e4.tar.bz2
llvm-39b5c0c049a19c7a7feffc9506da07923cc136e4.tar.xz
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/RegisterClassInfo.cpp')
-rw-r--r--lib/CodeGen/RegisterClassInfo.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/RegisterClassInfo.cpp b/lib/CodeGen/RegisterClassInfo.cpp
index 805d235673..bc48cfcc5c 100644
--- a/lib/CodeGen/RegisterClassInfo.cpp
+++ b/lib/CodeGen/RegisterClassInfo.cpp
@@ -44,7 +44,7 @@ void RegisterClassInfo::runOnMachineFunction(const MachineFunction &mf) {
}
// Does this MF have different CSRs?
- const uint16_t *CSR = TRI->getCalleeSavedRegs(MF);
+ const MCPhysReg *CSR = TRI->getCalleeSavedRegs(MF);
if (Update || CSR != CalleeSaved) {
// Build a CSRNum map. Every CSR alias gets an entry pointing to the last
// overlapping CSR.
@@ -79,14 +79,14 @@ void RegisterClassInfo::compute(const TargetRegisterClass *RC) const {
unsigned NumRegs = RC->getNumRegs();
if (!RCI.Order)
- RCI.Order.reset(new unsigned[NumRegs]);
+ RCI.Order.reset(new MCPhysReg[NumRegs]);
unsigned N = 0;
- SmallVector<unsigned, 16> CSRAlias;
+ SmallVector<MCPhysReg, 16> CSRAlias;
// FIXME: Once targets reserve registers instead of removing them from the
// allocation order, we can simply use begin/end here.
- ArrayRef<uint16_t> RawOrder = RC->getRawAllocationOrder(*MF);
+ ArrayRef<MCPhysReg> RawOrder = RC->getRawAllocationOrder(*MF);
for (unsigned i = 0; i != RawOrder.size(); ++i) {
unsigned PhysReg = RawOrder[i];
// Remove reserved registers from the allocation order.