[llvm] [TableGen][DecoderEmitter] Add option to emit type-specialized `decodeToMCInst` (PR #146593)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 4 01:31:18 PDT 2025
s-barannikov wrote:
> I kind of don't like that we have to describe the cpp types to tablegen at all. It feels like something we should be able to infer from the instruction widths.
I agree that ideally we should be able to infer the type from the instruction size. However, `InsnType` can be a custom type like AMDGPU's `DecoderUInt128`. We will need to be able to synthesize such types or provide a template supporting arbitrary widths (a wrapper over std::bitset?).
> I also don't like it being opt-in. Ideally we wouldn't have two different ways of creating decoders that we need to maintain. It would be nice if out of tree developers could get benefits without needing to stumble onto this new feature.
+1 as well.
https://github.com/llvm/llvm-project/pull/146593
More information about the llvm-commits
mailing list