[llvm] [TableGen][NFC] Replace hardcoded opcode numbering. (PR #81065)
Jason Eckhardt via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 19:28:46 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);
----------------
nvjle wrote:
> Is this map a candidate for deletion now? It looks like it might be redundant with the new map?
At first glance it does appear so, but I'm not entirely sure-- I'll need to look more carefully as a follow-up task (i.e., on better sleep).
https://github.com/llvm/llvm-project/pull/81065
More information about the llvm-commits
mailing list