diff options
author | Kazu Hirata <kazu@google.com> | 2021-11-28 18:14:49 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-11-28 18:14:49 -0800 |
commit | fd7d40640d26cd7834a1d85023ed9da8aef2a3a7 (patch) | |
tree | d3ae3277f9f1fe1a0e77c649b2ad507bef6a765d /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | ace1d0ad3dc43e28715cbe2f3e0a5a76578bda9f (diff) | |
download | llvm-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.cpp | 4 |
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) |