[PATCH] D127931: [TableGen] Emit instruction name in INSTRINFO_OPERAND_TYPE

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 19 15:55:07 PDT 2022


Amir marked 4 inline comments as done.
Amir added inline comments.


================
Comment at: llvm/utils/TableGen/InstrInfoEmitter.cpp:390
       OperandOffsets.push_back(CurrentOffset);
+      OffsetToInst.insert({CurrentOffset, Inst->TheDef->getName()});
       for (const auto &Op : Inst->Operands) {
----------------
craig.topper wrote:
> This is only storing the name of the last instruction that uses the offset. An instruction with no operands won't increment CurrentOffset.
You're right, thank you so much! I was initially keeping something else in this map, but in a later iterations this reduced only to the opcode which can be referenced from NumberedInstructions


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127931/new/

https://reviews.llvm.org/D127931



More information about the llvm-commits mailing list