range-for some things

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223263 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2014-12-03 19:58:49 +00:00
parent 4496906657
commit 687f237b53

View File

@ -1324,11 +1324,8 @@ static void computeUberWeights(std::vector<UberRegSet> &UberSets,
if (I->Weight != MaxWeight) { if (I->Weight != MaxWeight) {
DEBUG( DEBUG(
dbgs() << "UberSet " << I - UberSets.begin() << " Weight " << MaxWeight; dbgs() << "UberSet " << I - UberSets.begin() << " Weight " << MaxWeight;
for (CodeGenRegister::Set::iterator for (auto &Unit : I->Regs)
UnitI = I->Regs.begin(), UnitE = I->Regs.end(); dbgs() << " " << Unit->getName();
UnitI != UnitE; ++UnitI) {
dbgs() << " " << (*UnitI)->getName();
}
dbgs() << "\n"); dbgs() << "\n");
// Update the set weight. // Update the set weight.
I->Weight = MaxWeight; I->Weight = MaxWeight;
@ -1548,9 +1545,8 @@ void CodeGenRegBank::computeRegUnitSets() {
USIdx < USEnd; ++USIdx) { USIdx < USEnd; ++USIdx) {
dbgs() << "UnitSet " << USIdx << " " << RegUnitSets[USIdx].Name dbgs() << "UnitSet " << USIdx << " " << RegUnitSets[USIdx].Name
<< ":"; << ":";
ArrayRef<unsigned> Units = RegUnitSets[USIdx].Units; for (auto &U : RegUnitSets[USIdx].Units)
for (unsigned i = 0, e = Units.size(); i < e; ++i) dbgs() << " " << RegUnits[U].Roots[0]->getName();
dbgs() << " " << RegUnits[Units[i]].Roots[0]->getName();
dbgs() << "\n"; dbgs() << "\n";
}); });
@ -1562,9 +1558,8 @@ void CodeGenRegBank::computeRegUnitSets() {
USIdx < USEnd; ++USIdx) { USIdx < USEnd; ++USIdx) {
dbgs() << "UnitSet " << USIdx << " " << RegUnitSets[USIdx].Name dbgs() << "UnitSet " << USIdx << " " << RegUnitSets[USIdx].Name
<< ":"; << ":";
ArrayRef<unsigned> Units = RegUnitSets[USIdx].Units; for (auto &U : RegUnitSets[USIdx].Units)
for (unsigned i = 0, e = Units.size(); i < e; ++i) dbgs() << " " << RegUnits[U].Roots[0]->getName();
dbgs() << " " << RegUnits[Units[i]].Roots[0]->getName();
dbgs() << "\n"; dbgs() << "\n";
} }
dbgs() << "\nUnion sets:\n"); dbgs() << "\nUnion sets:\n");
@ -1609,9 +1604,8 @@ void CodeGenRegBank::computeRegUnitSets() {
else { else {
DEBUG(dbgs() << "UnitSet " << RegUnitSets.size()-1 DEBUG(dbgs() << "UnitSet " << RegUnitSets.size()-1
<< " " << RegUnitSets.back().Name << ":"; << " " << RegUnitSets.back().Name << ":";
ArrayRef<unsigned> Units = RegUnitSets.back().Units; for (auto &U : RegUnitSets.back().Units)
for (unsigned i = 0, e = Units.size(); i < e; ++i) dbgs() << " " << RegUnits[U].Roots[0]->getName();
dbgs() << " " << RegUnits[Units[i]].Roots[0]->getName();
dbgs() << "\n";); dbgs() << "\n";);
} }
} }
@ -1625,9 +1619,8 @@ void CodeGenRegBank::computeRegUnitSets() {
USIdx < USEnd; ++USIdx) { USIdx < USEnd; ++USIdx) {
dbgs() << "UnitSet " << USIdx << " " << RegUnitSets[USIdx].Name dbgs() << "UnitSet " << USIdx << " " << RegUnitSets[USIdx].Name
<< ":"; << ":";
ArrayRef<unsigned> Units = RegUnitSets[USIdx].Units; for (auto &U : RegUnitSets[USIdx].Units)
for (unsigned i = 0, e = Units.size(); i < e; ++i) dbgs() << " " << RegUnits[U].Roots[0]->getName();
dbgs() << " " << RegUnits[Units[i]].Roots[0]->getName();
dbgs() << "\n"; dbgs() << "\n";
}); });
@ -1648,8 +1641,8 @@ void CodeGenRegBank::computeRegUnitSets() {
continue; continue;
DEBUG(dbgs() << "RC " << RC.getName() << " Units: \n"; DEBUG(dbgs() << "RC " << RC.getName() << " Units: \n";
for (unsigned i = 0, e = RCRegUnits.size(); i < e; ++i) dbgs() for (auto &U : RCRegUnits)
<< RegUnits[RCRegUnits[i]].getRoots()[0]->getName() << " "; dbgs() << RegUnits[U].getRoots()[0]->getName() << " ";
dbgs() << "\n UnitSetIDs:"); dbgs() << "\n UnitSetIDs:");
// Find all supersets. // Find all supersets.