[PATCH] D77446: Add MIR-level debugify with only locations support for now

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 12:31:07 PDT 2020


vsk added a comment.

Awesome. Agreed that a proper -strip-debug pass is sorely needed (one that strips out the intrinsics/meta-instructions, dead prototypes, and unused metadata).

This looks good overall but needs a test.



================
Comment at: llvm/include/llvm/Transforms/Utils/Debugify.h:22
+class DIBuilder;
+bool applyDebugifyMetadata(
+    Module &M, iterator_range<Module::iterator> Functions, StringRef Banner,
----------------
Could you please add doxygen for the parameters?


================
Comment at: llvm/lib/CodeGen/MachineDebugify.cpp:31
+  MachineFunction &MF = MMI.getOrCreateMachineFunction(F);
+  MF.dump();
+
----------------
Is MF.dump() needed?


================
Comment at: llvm/lib/CodeGen/MachineDebugify.cpp:45
+      // the imaginary source code.
+      MI.setDebugLoc(DILocation::get(Ctx, NextLine++, 1, SP));
+    }
----------------
Yes, this is fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77446





More information about the llvm-commits mailing list