[X86][tablgen] Refine the class RecognizableInstr. NFCI
authorShengchen Kan <shengchen.kan@intel.com>
Sat, 26 Mar 2022 14:29:23 +0000 (22:29 +0800)
committerShengchen Kan <shengchen.kan@intel.com>
Sat, 26 Mar 2022 14:41:49 +0000 (22:41 +0800)
commit271e8d2495e2194c25cb786b84ab86d15184aac3
tree7f48a4bb88d8b58971e9a872210dbb02b5e2be37
parentbfa2f25d350c1015b74b8a14684e68efa6500bbc
[X86][tablgen] Refine the class RecognizableInstr. NFCI

1. Add comments to explain why we set `isAsmParserOnly` for XACQUIRE and XRELEASE
2. Check `X86Inst` in the constructor of `RecognizableInstrBase` so that
   we can avoid the case where one of it's field is not initialized but
   accessed by user. (e.g. in X86EVEX2VEXTablesEmitter.cpp)
3. Move `Rec` from `RecognizableInstrBase` to `RecognizableInstr` to reduce
   size of `RecognizableInstrBase`
4. Remove out-of-date comments for shouldBeEmitted() (filter() was removed)
5. Add a basic field `IsAsmParserOnly` and remove the field
   `ShouldBeEmitted` b/c we can deduce it w/ little overhead
llvm/lib/Target/X86/X86InstrTSX.td
llvm/utils/TableGen/X86EVEX2VEXTablesEmitter.cpp
llvm/utils/TableGen/X86FoldTablesEmitter.cpp
llvm/utils/TableGen/X86MnemonicTables.cpp
llvm/utils/TableGen/X86RecognizableInstr.cpp
llvm/utils/TableGen/X86RecognizableInstr.h