[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
Sat May 2 15:55:03 PDT 2026


================
@@ -683,6 +683,58 @@ static std::vector<EncodingIsland> getIslands(const KnownBits &EncodingBits,
   return Islands;
 }
 
+static std::string getOperandFieldDescForDebug(const OperandInfo &OpInfo) {
+  if (OpInfo.Fields.empty() && !OpInfo.InitValue)
+    return "bits<0>";
+  if (OpInfo.fields().empty())
----------------
pchaudhuri-nv wrote:

Get it. Maybe we can create this PR then - https://github.com/llvm/llvm-project/pull/195489 where we get rid of fields() and the other accessor functions for Fields ?

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


More information about the llvm-commits mailing list