[llvm] [TableGen] Emit Debug code for dynamic bits(eg: instruction operands) in DecoderEmitter (PR #194699)

Prerona Chaudhuri via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 10:48:58 PDT 2026


pchaudhuri-nv wrote:

I agree that the code bloat is a lot, I had not considered during initial implementation - just that I personally believe this is a good to have feature especially when the underlying arch encoding is complex..

  Its a good suggestion to print only when the decoding fails. Will incorporate this.
  
  >> Only do this logging on a per-instruction basis, rather than per-operand.
  IIUC, this already exists on TOT right ? I was trying to see if our decoder can print the bits for which the decoding failed. Generally operands have these "dynamic bits" i.e some of the bits are set by the appropriate encoder functions which are invoked at run time..
  
  May I know what were you trying to convey ?

   
>> I'm not sure why this shows no change for x86 - are they using a different decoding mechanism? I know LLVM has two decoder systems.

They seem to be using custom decoder functions for decoding the complete instruction.

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


More information about the llvm-commits mailing list