[llvm] [TableGen] Implement getOperandIdxName (PR #154944)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 23 04:27:45 PDT 2025
================
@@ -223,17 +223,104 @@ void InstrInfoEmitter::EmitOperandInfo(raw_ostream &OS,
}
}
+static void emitGetInstructionIndexForOpLookup(
+ raw_ostream &OS, const MapVector<SmallVector<int>, unsigned> &OperandMap,
+ ArrayRef<unsigned> InstructionIndex) {
+ StringRef Type = OperandMap.size() <= UINT8_MAX + 1 ? "uint8_t" : "uint16_t";
+ OS << "LLVM_READONLY static " << Type
----------------
arsenm wrote:
```suggestion
OS << "LLVM_READONLY static " << Type
```
I think this technically qualifies for readnone, but the optimizer will take care of it anyway
https://github.com/llvm/llvm-project/pull/154944
More information about the llvm-commits
mailing list