diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-03-05 05:37:41 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-03-05 05:37:41 +0000 |
commit | 9ebfbf8b9fd5f982e0db9293808bd32168615ba9 (patch) | |
tree | 77ce098c0d4851df8117d3d0e669b8580911a98f /include | |
parent | ec93b6decad4b95fd8a9531dc024b2b1881019bf (diff) | |
download | external_llvm-9ebfbf8b9fd5f982e0db9293808bd32168615ba9.zip external_llvm-9ebfbf8b9fd5f982e0db9293808bd32168615ba9.tar.gz external_llvm-9ebfbf8b9fd5f982e0db9293808bd32168615ba9.tar.bz2 |
Convert more GenRegisterInfo tables from unsigned to uint16_t to reduce static data size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCRegisterInfo.h | 18 | ||||
-rw-r--r-- | include/llvm/Target/TargetRegisterInfo.h | 6 |
2 files changed, 12 insertions, 12 deletions
diff --git a/include/llvm/MC/MCRegisterInfo.h b/include/llvm/MC/MCRegisterInfo.h index 6db4666..2d9a459 100644 --- a/include/llvm/MC/MCRegisterInfo.h +++ b/include/llvm/MC/MCRegisterInfo.h @@ -107,9 +107,9 @@ public: /// struct MCRegisterDesc { const char *Name; // Printable name for the reg (for debugging) - unsigned Overlaps; // Overlapping registers, described above - unsigned SubRegs; // Sub-register set, described above - unsigned SuperRegs; // Super-register set, described above + uint16_t Overlaps; // Overlapping registers, described above + uint16_t SubRegs; // Sub-register set, described above + uint16_t SuperRegs; // Super-register set, described above }; /// MCRegisterInfo base class - We assume that the target defines a static @@ -134,8 +134,8 @@ private: const MCRegisterClass *Classes; // Pointer to the regclass array unsigned NumClasses; // Number of entries in the array const uint16_t *Overlaps; // Pointer to the overlaps array - const unsigned *SubRegs; // Pointer to the subregs array - const unsigned *SuperRegs; // Pointer to the superregs array + const uint16_t *SubRegs; // Pointer to the subregs array + const uint16_t *SuperRegs; // Pointer to the superregs array const uint16_t *SubRegIndices; // Pointer to the subreg lookup // array. unsigned NumSubRegIndices; // Number of subreg indices. @@ -150,8 +150,8 @@ public: /// auto-generated routines. *DO NOT USE*. void InitMCRegisterInfo(const MCRegisterDesc *D, unsigned NR, unsigned RA, const MCRegisterClass *C, unsigned NC, - const uint16_t *O, const unsigned *Sub, - const unsigned *Super, + const uint16_t *O, const uint16_t *Sub, + const uint16_t *Super, const uint16_t *SubIndices, unsigned NumIndices) { Desc = D; @@ -237,7 +237,7 @@ public: /// returned is zero terminated and sorted according to super-sub register /// relations. e.g. X86::RAX's sub-register list is EAX, AX, AL, AH. /// - const unsigned *getSubRegisters(unsigned RegNo) const { + const uint16_t *getSubRegisters(unsigned RegNo) const { return SubRegs + get(RegNo).SubRegs; } @@ -263,7 +263,7 @@ public: /// returned is zero terminated and sorted according to super-sub register /// relations. e.g. X86::AL's super-register list is AX, EAX, RAX. /// - const unsigned *getSuperRegisters(unsigned RegNo) const { + const uint16_t *getSuperRegisters(unsigned RegNo) const { return SuperRegs + get(RegNo).SuperRegs; } diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h index 44566ed..0cef350 100644 --- a/include/llvm/Target/TargetRegisterInfo.h +++ b/include/llvm/Target/TargetRegisterInfo.h @@ -159,7 +159,7 @@ public: /// getSubClassMask - Returns a bit vector of subclasses, including this one. /// The vector is indexed by class IDs, see hasSubClassEq() above for how to /// use it. - const unsigned *getSubClassMask() const { + const uint32_t *getSubClassMask() const { return SubClassMask; } @@ -340,7 +340,7 @@ public: /// isSuperRegister - Returns true if regB is a super-register of regA. /// bool isSuperRegister(unsigned regA, unsigned regB) const { - for (const unsigned *regList = getSuperRegisters(regA); *regList;++regList){ + for (const uint16_t *regList = getSuperRegisters(regA); *regList;++regList){ if (*regList == regB) return true; } return false; @@ -387,7 +387,7 @@ public: /// Reg so its sub-register of index SubIdx is Reg. unsigned getMatchingSuperReg(unsigned Reg, unsigned SubIdx, const TargetRegisterClass *RC) const { - for (const unsigned *SRs = getSuperRegisters(Reg); unsigned SR = *SRs;++SRs) + for (const uint16_t *SRs = getSuperRegisters(Reg); unsigned SR = *SRs;++SRs) if (Reg == getSubReg(SR, SubIdx) && RC->contains(SR)) return SR; return 0; |