[llvm] [DFAJumpThreading][NFC] Use const reference as range variable (PR #90342)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 27 05:58:14 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: XChy (XChy)
<details>
<summary>Changes</summary>
Fixes #<!-- -->90286
---
Full diff: https://github.com/llvm/llvm-project/pull/90342.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp b/llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
index 14cdcc956aa5d7..fe5eeb1dcdf32f 100644
--- a/llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
@@ -553,7 +553,7 @@ struct AllSwitchPaths {
return;
}
- for (PathType Path : LoopPaths) {
+ for (const PathType& Path : LoopPaths) {
ThreadingPath TPath;
const BasicBlock *PrevBB = Path.back();
``````````
</details>
https://github.com/llvm/llvm-project/pull/90342
More information about the llvm-commits
mailing list