llvm-project
6c979bbc - [X86] Hoist ReservedIdentifiers to MCAsmInfo and shrink setup cost. NFC (#196699)

Commit
2 days ago
[X86] Hoist ReservedIdentifiers to MCAsmInfo and shrink setup cost. NFC (#196699) PR #186570 added a per-MCAsmInfo `StringSet<>` populated with X86 register names plus Intel-syntax keywords, which caused a minor instructions:u increase. Avoid heap allocation and hoist `ReservedIdentifiers` to MCAsmInfo for other targets. For the register-name source, prefer `X86IntelInstPrinter::getRegisterName` over `MCRegisterInfo::getName`. The former is a TableGen-emitted accessor into a `static const char AsmStrs[]` pool in `X86GenAsmWriter1.inc`, populated from the lowercase asm-name argument of each `def XX : X86Reg<"xx", ...>;` in `X86RegisterInfo.td`.
Author
Parents
Loading