[llvm] [DebugInfo][RemoveDIs] Support cloning and remapping DPValues (PR #72546)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 23 07:50:35 PST 2023


================
@@ -3327,13 +3340,26 @@ FoldCondBranchOnValueKnownInPredecessorImpl(BranchInst *BI, DomTreeUpdater *DTU,
           TranslateMap[&*BBI] = N;
       }
       if (N) {
+        // Copy all debug-info attached to instructions from the last we
+        // successfully clone, up to this instruction (they might have been
+        // folded away).
+        for (; DbgInfoCursor != BBI; ++DbgInfoCursor)
----------------
OCHyams wrote:

Hasn't `eraseFromParent` been called on the `DbgInfoCursor` instructions?

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


More information about the llvm-commits mailing list