LiveInterval: Use range based for loops for subregister ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223991 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matthias Braun
2014-12-11 00:59:06 +00:00
parent d1db29860c
commit 1bfcc2d56f
9 changed files with 110 additions and 126 deletions

View File

@ -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;
}