summaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2025-01-27 15:25:17 +0000
committerGitHub <noreply@github.com>2025-01-27 15:25:17 +0000
commite14962a39cc6476bebba65e5639b74b0318c7fc3 (patch)
tree2c5f513c4703b51bc8ea723fe2890910fe7b30e6 /llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
parent5aafc6d58f3405662902cee006be11e599801b88 (diff)
[NFC][DebugInfo] Use iterators for instruction insertion in more places (#124291)
As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. This patch changes some more complex call-sites, those crossing file boundaries and where I've had to perform some minor rewrites.
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 5a9a7ecdc13b..f57ec3f57b23 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -6138,7 +6138,7 @@ void LSRInstance::ImplementSolution(
if (!llvm::all_of(BO->uses(),
[&](Use &U) {return DT.dominates(IVIncInsertPos, U);}))
continue;
- BO->moveBefore(IVIncInsertPos);
+ BO->moveBefore(IVIncInsertPos->getIterator());
Changed = true;
}