[PATCH] D136949: [Debugify] Accumulate the number of variables in debugify metadata

Anton Sidorenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 02:57:39 PST 2022


asi-sc added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineDebugify.cpp:176
+    if (auto *NMD = M.getNamedMetadata("llvm.mir.debugify"))
+      M.eraseNamedMetadata(NMD);
     MachineModuleInfo &MMI =
----------------
xiangzhangllvm wrote:
> Here is runOnModule not runOnFunction, so I think here should only has 1 "llvm.mir.debugify".
> I think the process should be "run 1 time debugfy for a module" --> optimizations--> "debugfy check" -->  "clear the debugify info before next debugify cycle"
> Sorry for the code is a little long time for me.
> 
Yeah, I did it a little wrong. So, the root cause is that we don't strip `llvm.mir.debugify` metadata. In this patch I suggest just checking that we do not forget to remove the old metadata when re-running the pass. And I'll create a fix to `stripDebugifyMetadata` to strip not only `llvm.debugify` but `llvm.mir.debugify` as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136949



More information about the llvm-commits mailing list