summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveRegMatrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/LiveRegMatrix.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveRegMatrix.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveRegMatrix.cpp b/llvm/lib/CodeGen/LiveRegMatrix.cpp
index 66709aec77a..b0438db4417 100644
--- a/llvm/lib/CodeGen/LiveRegMatrix.cpp
+++ b/llvm/lib/CodeGen/LiveRegMatrix.cpp
@@ -79,10 +79,9 @@ bool foreachUnit(const TargetRegisterInfo *TRI, LiveInterval &VRegInterval,
for (MCRegUnitMaskIterator Units(PhysReg, TRI); Units.isValid(); ++Units) {
unsigned Unit = (*Units).first;
unsigned Mask = (*Units).second;
- for (LiveInterval::subrange_iterator S = VRegInterval.subrange_begin(),
- SE = VRegInterval.subrange_end(); S != SE; ++S) {
- if (S->LaneMask & Mask) {
- if (Func(Unit, *S))
+ for (LiveInterval::SubRange &S : VRegInterval.subranges()) {
+ if (S.LaneMask & Mask) {
+ if (Func(Unit, S))
return true;
break;
}
OpenPOWER on IntegriCloud