[llvm] [DebugInfo][RemoveDIs] Support maintaining DPValues in CodeGenPrepare (PR #73660)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 08:40:13 PST 2023


================
@@ -8371,8 +8427,10 @@ bool CodeGenPrepare::placeDbgValues(Function &F) {
   for (BasicBlock &BB : F) {
     for (Instruction &Insn : llvm::make_early_inc_range(BB)) {
       DbgValueInst *DVI = dyn_cast<DbgValueInst>(&Insn);
-      if (!DVI)
+      if (!DVI) {
+        MadeChange |= placeDPValues(Insn, DT);
----------------
jmorse wrote:

Good question -- IMO DPValues on a DbgValueInst isn't a case we should consider as it indicates that something has gone horribly wrong already (and I think there's an assertion in the basic-block converter to catch that?). Were it a DbgDeclare that'd be different as we're supporting those in parallel right now.

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


More information about the llvm-commits mailing list