[PATCH] D77915: [Debugify] Strip added metadata in the -debugify-each pipeline

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 16:42:14 PDT 2020


dsanders accepted this revision.
dsanders added a comment.
This revision is now accepted and ready to land.

LGTM with the behavioural change to StripDebugMachineModule fixed



================
Comment at: llvm/include/llvm/IR/IntrinsicInst.h:71
     /// @{
-    static bool classof(const IntrinsicInst *I) {
-      switch (I->getIntrinsicID()) {
+    static bool isA(Intrinsic::ID ID) {
+      switch (ID) {
----------------
I think there might be potential for confusion between isa<DbgInfoIntrinsic>() and DbgInfoIntrinsic::isA(). Maybe isInstForInstrinsic(), or implementsInstrinsic()?


================
Comment at: llvm/lib/Transforms/Utils/Debugify.cpp:183-185
+  NamedMDNode *DebugifyMD = M.getNamedMetadata("llvm.debugify");
+  if (!DebugifyMD)
+    return Changed;
----------------
This will stop StripDebugMachineModule stripping debug info when OnlyDebugified is false.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77915





More information about the llvm-commits mailing list