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

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 09:17:19 PST 2023


================
@@ -2019,12 +2197,68 @@ void llvm::salvageDebugInfoForDbgValues(
     LLVM_DEBUG(dbgs() << "SALVAGE: " << *DII << '\n');
     Salvaged = true;
   }
+  // Duplicate of above block for DPValues.
+  for (auto *DPV : DPUsers) {
----------------
OCHyams wrote:

If not for the isa<dbg.assign> check in the original I'd be tempted to say this function might be better templated rather than copy/pasted due to its size. Casts make it ugly to do so, alas. The size of the duplication makes me nervous, but I'm not sure what else we can do without introducing a load of utilities (something like `isaDbgValue(DbgVariableIntrinsic *)` +  `isaDbgValue(DPValue *)` etc).

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


More information about the llvm-commits mailing list