aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SplitKit.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-02-21 19:58:07 -0800
committerKazu Hirata <kazu@google.com>2021-02-21 19:58:07 -0800
commitffba9e596d09a1d41f83102756e145b59d3f8495 (patch)
treeb5cc2badfc7d3f85ea950a1c1335ab4279ca74be /llvm/lib/CodeGen/SplitKit.cpp
parent5032b5890bb43895012585bd29ff5c3fbd1a7812 (diff)
downloadllvm-ffba9e596d09a1d41f83102756e145b59d3f8495.zip
llvm-ffba9e596d09a1d41f83102756e145b59d3f8495.tar.gz
llvm-ffba9e596d09a1d41f83102756e145b59d3f8495.tar.bz2
[CodeGen] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.cpp')
-rw-r--r--llvm/lib/CodeGen/SplitKit.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp
index 22cd63e..d778a9e 100644
--- a/llvm/lib/CodeGen/SplitKit.cpp
+++ b/llvm/lib/CodeGen/SplitKit.cpp
@@ -1270,11 +1270,9 @@ void SplitEditor::rewriteAssigned(bool ExtendRanges) {
SmallVector<ExtPoint,4> ExtPoints;
- for (MachineRegisterInfo::reg_iterator RI = MRI.reg_begin(Edit->getReg()),
- RE = MRI.reg_end(); RI != RE;) {
- MachineOperand &MO = *RI;
+ for (MachineOperand &MO :
+ llvm::make_early_inc_range(MRI.reg_operands(Edit->getReg()))) {
MachineInstr *MI = MO.getParent();
- ++RI;
// LiveDebugVariables should have handled all DBG_VALUE instructions.
if (MI->isDebugValue()) {
LLVM_DEBUG(dbgs() << "Zapping " << *MI);