diff options
author | Orlando Cazalet-Hyams <orlando.hyams@sony.com> | 2025-05-07 17:10:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-07 17:10:30 +0100 |
commit | 6a1f52150a56d797ac5cb71e75629e7fe5fd630a (patch) | |
tree | 6c4e78db0475f4f22c56dc39e17a5bc048a565af /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | |
parent | 1ad57b58d6ba53be99bd6f2fa928a126c9deb91c (diff) | |
download | llvm-6a1f52150a56d797ac5cb71e75629e7fe5fd630a.zip llvm-6a1f52150a56d797ac5cb71e75629e7fe5fd630a.tar.gz llvm-6a1f52150a56d797ac5cb71e75629e7fe5fd630a.tar.bz2 |
[KeyInstr][LoopRotate] Remap atoms of duplicated instructions (#133490)
RFC: https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp index c5c4968..73d0740 100644 --- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp @@ -657,6 +657,9 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) { // Otherwise, create a duplicate of the instruction. Instruction *C = Inst->clone(); + if (const DebugLoc &DL = C->getDebugLoc()) + mapAtomInstance(DL, ValueMap); + C->insertBefore(LoopEntryBranch->getIterator()); ++NumInstrsDuplicated; |