[llvm] [TableGen][DecoderEmitter] Add option to emit type-specialized code (PR #146593)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 22:16:45 PDT 2025
jurahul wrote:
what I am thinking is: If we make the entire decodeInstruction templated, we still get code duplication when it's instantiated for each type (RISCV will just do 1 instantiation, but other targets may not). So, I am trying to implement with no templating (which also matches well with the option name). That entails an impl function that is bitwidth agnostic (this will address code size) and we will still have the per-bitwidth entry point that will just call the impl function with appropriate lambdas to encapsulate any insn specific code, which includes calls to fieldFromInstruction, decodeToMCInst, and the +ve/-ve mask checks for softfail.
https://github.com/llvm/llvm-project/pull/146593
More information about the llvm-commits
mailing list