[PATCH] D91595: [Debugify] Support checking Machine IR debug info
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 17:37:28 PST 2020
LuoYuanke added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineCheckDebug.cpp:28
+
+struct CheckDebugMachineModule : public ModulePass {
+ bool runOnModule(Module &M) override {
----------------
Why is it struct, not class?
================
Comment at: llvm/lib/CodeGen/MachineDebugify.cpp:58
+ // And there's no meaning to add debug info for a terminator.
+ if (!MI.isTerminator())
+ MI.setDebugLoc(DILocation::get(Ctx, NextLine++, 1, SP));
----------------
Why terminator instruction don't need debug info?
================
Comment at: llvm/test/CodeGen/Generic/MIRDebugify/check-line-and-variables-x.mir:58
+ ; Let it missing !14 and debug-location !16
+ ;DBG_VALUE %0, $noreg, !14, !DIExpression(), debug-location !16
+ %2:gr32 = nsw ADD32rr %1, %0, implicit-def dead $eflags, debug-location !17
----------------
Do we need blank character between ';' and 'DBG_VALUE'?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91595/new/
https://reviews.llvm.org/D91595
More information about the llvm-commits
mailing list