[llvm] [TableGen] Implement getOperandIdxName (PR #154944)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 12:49:52 PDT 2025


================
@@ -257,7 +339,7 @@ void InstrInfoEmitter::emitOperandNameMappings(
   /// instructions that have identical OpName -> Operand index mapping.
   MapVector<SmallVector<int>, unsigned> OperandMap;
 
-  // Max operand index seen.
+  // Max operand index seen + 1.
----------------
jurahul wrote:

The name now does not match the semantics of this variable.  One option is to keep this as is and then add:

```
unsigned MaxNumOperands  = MaxOperandNo + 1;
```

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


More information about the llvm-commits mailing list