[llvm] [TableGen][NFC] Replace hardcoded opcode numbering. (PR #81065)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 19:03:52 PST 2024
================
@@ -1399,9 +1399,8 @@ void InstructionOpcodeMatcher::initOpcodeValuesMap(
const CodeGenTarget &Target) {
OpcodeValues.clear();
- unsigned OpcodeValue = 0;
for (const CodeGenInstruction *I : Target.getInstructionsByEnumValue())
- OpcodeValues[I] = OpcodeValue++;
+ OpcodeValues[I] = Target.getInstrIntValue(I->TheDef);
----------------
topperc wrote:
Is this map a candidate for deletion now? It looks like it might be redundant with the new map?
https://github.com/llvm/llvm-project/pull/81065
More information about the llvm-commits
mailing list