[llvm] [TableGen][DecoderEmitter] Add option to emit type-specialized `decodeToMCInst` (PR #146593)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 12 01:33:41 PDT 2025


================
@@ -1158,6 +1157,12 @@ class InstrInfo {
   //
   // This option is a temporary migration help. It will go away.
   bit guessInstructionProperties = true;
+
+  // Option to choose bewteen templated and non-templated code from decoder
+  // emitter. This means that the generated `decodeInstruction` function will
+  // use auto-inferred types for the instruction payload instead of generating
+  // templated code using `InsnType` for the instruction payload.
+  bit GenerateTemplatedDecoder = true;
----------------
s-barannikov wrote:

We have enough examples proving otherwise. Look at the flag above, for example.
Targets that have not migrated should set it to true with a FIXME/TODO.


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


More information about the llvm-commits mailing list