River707 wrote: Instead of adding more c++ code, did you consider just expanding what the struct directing in tablegen can support? Why not extend that to support using a custom directive for the individual fields? https://github.com/llvm/llvm-project/pull/133939