[llvm] [DebugInfo][SimpleLoopUnswitch] Fix missing debug location updates (PR #97662)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 04:31:58 PDT 2024
================
@@ -1245,9 +1245,12 @@ static BasicBlock *buildClonedLoopBlocks(
if (SE && isa<PHINode>(I))
SE->forgetValue(&I);
+ Instruction *InsertPt = &*MergeBB->getFirstInsertionPt();
----------------
OCHyams wrote:
Can we keep this as an iterator rather than dereference it? It has variable location implications in `Instruction::insertBefore` (more info [here](https://llvm.org/docs/RemoveDIsDebugInfo.html#api-changes) -TL;DR, there's an extra bit in iterators that determines whether the iterator points before this instruction only or additionally the debug records attached to it too).
https://github.com/llvm/llvm-project/pull/97662
More information about the llvm-commits
mailing list