[llvm] [MC][TableGen] Pack MCInstrDesc fields into 24 bytes (PR #202647)

David Zbarsky via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 08:08:53 PDT 2026


================
@@ -203,23 +204,40 @@ class MCInstrDesc {
   // the <Target>Insts table because they rely on knowing their own address to
   // find other information elsewhere in the same table.
 
-  uint32_t Opcode;         // The opcode number.
-  uint16_t NumOperands;    // Num of args (may be more if variable_ops)
-  uint8_t NumDefs;         // Num of args that are definitions
-  uint8_t Size;            // Number of bytes in encoding.
-  uint16_t SchedClass;     // enum identifying instr sched class
-  uint8_t NumImplicitUses; // Num of regs implicitly used
-  uint8_t NumImplicitDefs; // Num of regs implicitly defined
-  uint16_t OpInfoOffset;   // Offset to info about operands
-  uint16_t ImplicitOffset; // Offset to start of implicit op list
-  uint64_t Flags;          // Flags identifying machine instr class
-  uint64_t TSFlags;        // Target Specific Flag values
+  uint64_t TSFlags;         // Target-specific flag values.
+  uint64_t Flags : 41;      // Flags identifying machine instruction classes.
----------------
dzbarsky wrote:

compile time looks like some small regressions if I'm interpreting correctly, wdyt? https://llvm-compile-time-tracker.com/compare.php?from=7087094b05a1bba64a99474cc501328919e11b4a&to=c918ca1b4218a5369ec4018b2126c18ebed4030b&stat=instructions:u

https://github.com/llvm/llvm-project/pull/202647


More information about the llvm-commits mailing list