[PATCH] D91595: [Debugify] Support checking Machine IR debug info

Xiang Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 16:34:36 PST 2020


xiangzhangllvm marked an inline comment as done.
xiangzhangllvm added inline comments.


================
Comment at: llvm/lib/CodeGen/CMakeLists.txt:77
   MachineCSE.cpp
+  MachineCheckDebug.cpp
   MachineDebugify.cpp
----------------
djtodoro wrote:
> I would pick `MachineCheckDebugify`, wdyt?
Yes, I noticed that, I also found mir-strip-debug implemented in MachineStripDebug.cpp, so I sync it with mir-strip-debug.


================
Comment at: llvm/lib/CodeGen/MachineCheckDebug.cpp:58
+        for (MachineInstr &MI : MBB) {
+          if (!MI.isDebugValue())
+            continue;
----------------
djtodoro wrote:
> I think we should do this for finding missing variables; but for the checking of missing lines we should check more machine instructions (especially the instrs other than debug ones), right? Any reason we shouldn't do that?
> 
> Please check the `checkDebugifyMetadata()` (from Debugify.cpp) how it was done.
Because the MirDebugify will generate DBG_VALUE for every MIRs, all these MIRs' debug location will be saved in these generated DBG_VALUEs. So here we just need to check the line info in these DBG_VALUEs. It is also ok the check the non_debug MIR again, but it is duplicated.


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

https://reviews.llvm.org/D91595



More information about the llvm-commits mailing list