Make some range based loop types more explicit.

No functional change, but more readable code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205451 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2014-04-02 19:28:08 +00:00
parent b96fc4a5ea
commit b4e30b31e9
2 changed files with 6 additions and 6 deletions

View File

@ -371,7 +371,7 @@ ARM64AddressTypePromotion::propagateSignExtension(Instructions &SExtInsts) {
mergeSExts(ValToSExtendedUses, ToRemove);
// Remove all instructions marked as ToRemove.
for (auto I: ToRemove)
for (Instruction *I: ToRemove)
I->eraseFromParent();
return LocalChange;
}
@ -383,7 +383,7 @@ void ARM64AddressTypePromotion::mergeSExts(ValueToInsts &ValToSExtendedUses,
for (auto &Entry: ValToSExtendedUses) {
Instructions &Insts = Entry.second;
Instructions CurPts;
for (auto Inst : Insts) {
for (Instruction *Inst : Insts) {
if (ToRemove.count(Inst))
continue;
bool inserted = false;

View File

@ -420,7 +420,7 @@ static void reachingDefAlgorithm(MachineFunction *MF,
BBInSet.insert(PredOutSet.begin(), PredOutSet.end());
}
// insert reachableUses[bb][color] in each in[bb][color] op.reachedses
for (const auto MI: BBInSet) {
for (const MachineInstr *MI: BBInSet) {
SetOfMachineInstr &OpReachedUses =
getUses(ColorOpToReachedUses, CurReg, MI);
OpReachedUses.insert(BBReachableUses.begin(), BBReachableUses.end());
@ -635,7 +635,7 @@ static void reachedUsesToDefs(InstrToInstrs &UseToReachingDefs,
}
}
}
for (const auto Elem : NotCandidate) {
for (const MachineInstr *Elem : NotCandidate) {
DEBUG(dbgs() << "Too many reaching defs: " << *Elem << "\n");
// It would have been better if we could just remove the entry
// from the map. Because of that, we have to filter the garbage
@ -916,7 +916,7 @@ static void computeOthers(const InstrToInstrs &UseToDefs,
if (DefsOfPotentialCandidates.empty()) {
// lazy init
DefsOfPotentialCandidates = PotentialCandidates;
for (const auto Candidate : PotentialCandidates) {
for (const MachineInstr *Candidate : PotentialCandidates) {
if (!UseToDefs.find(Candidate)->second.empty())
DefsOfPotentialCandidates.insert(
*UseToDefs.find(Candidate)->second.begin());
@ -1030,7 +1030,7 @@ static void computeOthers(const InstrToInstrs &UseToDefs,
}
// Now, we grabbed all the big patterns, check ADR opportunities.
for (const auto Candidate: PotentialADROpportunities)
for (const MachineInstr *Candidate: PotentialADROpportunities)
registerADRCandidate(Candidate, UseToDefs, DefsPerColorToUses, ARM64FI,
InvolvedInLOHs, RegToId);
}