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

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 03:32:58 PST 2023


================
@@ -8095,10 +8123,14 @@ static bool optimizeBranch(BranchInst *Branch, const TargetLowering &TLI,
 }
 
 bool CodeGenPrepare::optimizeInst(Instruction *I, ModifyDT &ModifiedDT) {
+  bool AnyChange = false;
+  for (DPValue &DPV : I->getDbgValueRange())
+    AnyChange |= fixupDPValue(DPV);
----------------
OCHyams wrote:

I suppose we want fixupDPValues to affect the return value "has a made change" to maintain parity with dbg.values. But is that desirable behaviour overall? Is this something we want to come back and change in the future? If so, wdyt of adding add a FIXME comment.

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


More information about the llvm-commits mailing list