aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-11-28 18:14:49 -0800
committerKazu Hirata <kazu@google.com>2021-11-28 18:14:49 -0800
commitfd7d40640d26cd7834a1d85023ed9da8aef2a3a7 (patch)
treed3ae3277f9f1fe1a0e77c649b2ad507bef6a765d /llvm/lib/CodeGen/BranchFolding.cpp
parentace1d0ad3dc43e28715cbe2f3e0a5a76578bda9f (diff)
downloadllvm-fd7d40640d26cd7834a1d85023ed9da8aef2a3a7.zip
llvm-fd7d40640d26cd7834a1d85023ed9da8aef2a3a7.tar.gz
llvm-fd7d40640d26cd7834a1d85023ed9da8aef2a3a7.tar.bz2
[llvm] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index 5ac8f49..64dadc82 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -1013,8 +1013,8 @@ bool BranchFolder::TailMergeBlocks(MachineFunction &MF) {
// If this is a large problem, avoid visiting the same basic blocks
// multiple times.
if (MergePotentials.size() == TailMergeThreshold)
- for (unsigned i = 0, e = MergePotentials.size(); i != e; ++i)
- TriedMerging.insert(MergePotentials[i].getBlock());
+ for (const MergePotentialsElt &Elt : MergePotentials)
+ TriedMerging.insert(Elt.getBlock());
// See if we can do any tail merging on those.
if (MergePotentials.size() >= 2)