diff options
author | Kazu Hirata <kazu@google.com> | 2021-12-03 20:45:59 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-12-03 20:45:59 -0800 |
commit | 3aed2822574f7062122fc940786024ca869d21c4 (patch) | |
tree | ee5f0c6d6c8b40fdafdd8e67a95e16a1b9672a7a /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | eeb4266f8137c232f0f218a727dd12b5d4f52adc (diff) | |
download | llvm-3aed2822574f7062122fc940786024ca869d21c4.zip llvm-3aed2822574f7062122fc940786024ca869d21c4.tar.gz llvm-3aed2822574f7062122fc940786024ca869d21c4.tar.bz2 |
[CodeGen] 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 64dadc82..0ff67f7 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -1125,8 +1125,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 (MergePotentialsElt &Elt : MergePotentials) + TriedMerging.insert(Elt.getBlock()); if (MergePotentials.size() >= 2) MadeChange |= TryTailMergeBlocks(IBB, PredBB, MinCommonTailLength); |