Skip to content

Commit f06756f

Browse files
authored
Store sysreg names in-line with their descriptors. (#119157)
This wastes some disk space, because we have to size the arrays for the maximum possible length. However, it eliminates dynamic relocations from the SysRegsList arrays.
1 parent 7a38445 commit f06756f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,8 @@ AArch64StringToVectorLayout(StringRef LayoutStr) {
700700

701701
namespace AArch64SysReg {
702702
struct SysReg {
703-
const char *Name;
704-
const char *AltName;
703+
const char Name[32];
704+
const char AltName[32];
705705
unsigned Encoding;
706706
bool Readable;
707707
bool Writeable;

llvm/lib/Target/ARM/Utils/ARMBaseInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ inline static unsigned ARMCondCodeFromString(StringRef CC) {
189189
// System Registers
190190
namespace ARMSysReg {
191191
struct MClassSysReg {
192-
const char *Name;
192+
const char Name[32];
193193
uint16_t M1Encoding12;
194194
uint16_t M2M3Encoding8;
195195
uint16_t Encoding;

llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,9 @@ int getLoadFPImm(APFloat FPImm);
452452

453453
namespace RISCVSysReg {
454454
struct SysReg {
455-
const char *Name;
456-
const char *AltName;
457-
const char *DeprecatedName;
455+
const char Name[32];
456+
const char AltName[32];
457+
const char DeprecatedName[32];
458458
unsigned Encoding;
459459
// FIXME: add these additional fields when needed.
460460
// Privilege Access: Read, Write, Read-Only.

0 commit comments

Comments
 (0)