diff options
author | Kazu Hirata <kazu@google.com> | 2021-09-18 09:29:24 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-09-18 09:29:24 -0700 |
commit | 48719e3b1861a9b8216dc3aa4dce1b05389f0aff (patch) | |
tree | 2a749bac3b0a39c118d0612031b2b88042db0481 /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | 2b44a7325c56cdd78bbcfab7ff7a00126aa5c822 (diff) | |
download | llvm-48719e3b1861a9b8216dc3aa4dce1b05389f0aff.zip llvm-48719e3b1861a9b8216dc3aa4dce1b05389f0aff.tar.gz llvm-48719e3b1861a9b8216dc3aa4dce1b05389f0aff.tar.bz2 |
[CodeGen] Use make_early_inc_range (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index 2f07c4b..5ac8f49 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -1752,10 +1752,8 @@ ReoptimizeBlock: bool BranchFolder::HoistCommonCode(MachineFunction &MF) { bool MadeChange = false; - for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ) { - MachineBasicBlock *MBB = &*I++; - MadeChange |= HoistCommonCodeInSuccs(MBB); - } + for (MachineBasicBlock &MBB : llvm::make_early_inc_range(MF)) + MadeChange |= HoistCommonCodeInSuccs(&MBB); return MadeChange; } |