aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-04-16 08:25:28 -0700
committerKazu Hirata <kazu@google.com>2023-04-16 08:25:28 -0700
commitc83c4b58d1c1125cbac0a54266ff570e9e1f6845 (patch)
tree3c6475747ccf06dfec9519be228642a67c8ee3dc /llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
parent668045eb77628be13e448ffbb855473ffca1cc43 (diff)
downloadllvm-c83c4b58d1c1125cbac0a54266ff570e9e1f6845.zip
llvm-c83c4b58d1c1125cbac0a54266ff570e9e1f6845.tar.gz
llvm-c83c4b58d1c1125cbac0a54266ff570e9e1f6845.tar.bz2
[Transforms] Apply fixes from performance-for-range-copy (NFC)
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
index e78c7a8..68e15de 100644
--- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -2762,7 +2762,7 @@ static int CalculateUnswitchCostMultiplier(
// Count amount of clones that all the candidates might cause during
// unswitching. Branch/guard counts as 1, switch counts as log2 of its cases.
int UnswitchedClones = 0;
- for (auto Candidate : UnswitchCandidates) {
+ for (const auto &Candidate : UnswitchCandidates) {
const Instruction *CI = Candidate.TI;
const BasicBlock *CondBlock = CI->getParent();
bool SkipExitingSuccessors = DT.dominates(CondBlock, Latch);