[PATCH] D77747: Add pass to strip debug info from MIR

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 13:15:24 PDT 2020


vsk accepted this revision.
vsk added a comment.

Still looks good, with minor inline comments.



================
Comment at: llvm/lib/CodeGen/MachineStripDebug.cpp:40
+            //        the usual three and has a test that depends on it's
+            //        preservation. Preserve it for now.
+            if (I->getNumOperands() > 1) {
----------------
Could you file a PR on bugzilla about this test?


================
Comment at: llvm/lib/CodeGen/MachineStripDebug.cpp:65
+    if (NMD)
+      NMD->eraseFromParent();
+
----------------
This should update Changed (not 100% sure, but StripDebugInfo may be a no-op if the function is empty).


================
Comment at: llvm/lib/CodeGen/MachineStripDebug.cpp:73
+        Flags.push_back(Flag);
+      NMD->clearOperands();
+      for (MDNode *Flag : Flags) {
----------------
We probably should update Changed here as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77747





More information about the llvm-commits mailing list