[llvm] [DebugInfo][RemoveDIs] Add local-utility plumbing for DPValues (PR #72276)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 03:20:44 PST 2023


================
@@ -2391,6 +2688,8 @@ llvm::removeAllNonTerminatorAndEHPadInstructions(BasicBlock *BB) {
       ++NumDeadDbgInst;
     else
       ++NumDeadInst;
+    // RemoveDIs: erasing debug-info must be done manually.
----------------
jmorse wrote:

For EH pads this isn't an issue AFAIUI as getFirstInsertionPoint skips over those, and it would be an error for it to carry any variable assignments in either DbgValue or DPValue mode. I'm not sure about token types... I don't think I've ever seen one in the wild. I'd be inclined to say that we should ignore them, but there's no cost to _trying_ to drop them I guess, I've added a call on basis.

https://github.com/llvm/llvm-project/pull/72276


More information about the llvm-commits mailing list