[PATCH] D157515: [GlobalISel] Also set dead flags of implicit defs added by BuildMI

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 10:45:38 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h:348
+  /// - InsnID - Instruction ID to modify
+  /// - RegNum - The implicit def to look for
+  GIR_SetImplicitDefDead,
----------------
Alternatively could give the operand index directly, it should know


================
Comment at: llvm/utils/TableGen/GlobalISelMatchTable.cpp:1973-1974
+    if (DeadImplicitDefs.contains(Def)) {
+      auto Namespace =
+          Def->getValue("Namespace") ? Def->getValueAsString("Namespace") : "";
+      Table << MatchTable::Opcode("GIR_SetImplicitDefDead")
----------------
namespace defined twice identically?


================
Comment at: llvm/utils/TableGen/GlobalISelMatchTable.cpp:1976
+      Table << MatchTable::Opcode("GIR_SetImplicitDefDead")
+            << MatchTable::Comment("InsnID") << MatchTable::IntValue(InsnID)
+            << MatchTable::NamedValue(Namespace, Def->getName())
----------------
Could just emit the operand index, can do that in a follow up if you want


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157515



More information about the llvm-commits mailing list