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

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 2 16:47:41 PDT 2025


topperc wrote:

> > > > > @topperc My question is still unanswered. WDYT of this new interface to op-in into this optimization?
> > > > 
> > > > 
> > > > Interface seems fine. Do you plan to opt-in all targets or just the ones that benefit?
> > > 
> > > 
> > > Thanks. Maybe all targets? If nothing else, they probably benefit from compile time improvements due to non-templated code.
> > 
> > 
> > It's not many functions and not many callers per file right? If there's a big compile time cost for templates, `fieldFromInstruction` feels like it would be a bigger issue than `decodeToMCInst`.
> 
> Right, I am not sure what exactly might contribute to the compile time cost. But you're right, if we want we can specialize fieldFromInstruction as well once we have the types. May be in a follow-on PR.

Have you been able to measure a compile time cost or is this hypothetical?

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


More information about the llvm-commits mailing list