[llvm] [DebugInfo][RemoveDIs] Instrument loop-rotate for DPValues (PR #72997)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 23 05:16:16 PST 2023


================
@@ -551,7 +606,17 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
       if (L->hasLoopInvariantOperands(Inst) && !Inst->mayReadFromMemory() &&
           !Inst->mayWriteToMemory() && !Inst->isTerminator() &&
           !isa<DbgInfoIntrinsic>(Inst) && !isa<AllocaInst>(Inst)) {
+
+        if (LoopEntryBranch->getParent()->IsNewDbgInfoFormat) {
+          auto DbgValueRange =
+              LoopEntryBranch->cloneDebugInfoFrom(Inst, NextDbgInst);
----------------
OCHyams wrote:

That makes sense now, thanks for bearing with me!

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


More information about the llvm-commits mailing list