[PATCH] D99169: [DebugInfo] Replace debug uses in replaceUsesOutsideBlock

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 05:22:50 PDT 2021


djtodoro added a comment.

Thanks for this! The results are amazing.



================
Comment at: llvm/lib/IR/Value.cpp:547-553
+  // Replace dbg.* uses of MetadataAsValue(ValueAsMetadata(this)) outside BB.
+  SmallVector<DbgVariableIntrinsic *> DbgUsers;
+  findDbgUsers(DbgUsers, this);
+  for (auto *DVI : DbgUsers) {
+    if (DVI->getParent() != BB)
+      DVI->replaceVariableLocationOp(this, New);
+  }
----------------
Can we factor out this into a separate predicate?


================
Comment at: llvm/test/DebugInfo/Generic/instcombine-replaced-select-with-operand.ll:108-111
+!36 = !{!37, !37, i64 0}
+!37 = !{!"any pointer", !38, i64 0}
+!38 = !{!"omnipotent char", !39, i64 0}
+!39 = !{!"Simple C++ TBAA"}
----------------
I guess we don't need tbaa


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

https://reviews.llvm.org/D99169



More information about the llvm-commits mailing list