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

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sat May 2 08:08:22 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())
----------------
s-barannikov wrote:

I guess this is just a historical artifact and we can remove `fields()` method and use `Fields` member directly.


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


More information about the llvm-commits mailing list