[llvm] r205451 - Make some range based loop types more explicit.
Jim Grosbach
grosbach at apple.com
Wed Apr 2 12:28:08 PDT 2014
Author: grosbach
Date: Wed Apr 2 14:28:08 2014
New Revision: 205451
URL: http://llvm.org/viewvc/llvm-project?rev=205451&view=rev
Log:
Make some range based loop types more explicit.
No functional change, but more readable code.
Modified:
llvm/trunk/lib/Target/ARM64/ARM64AddressTypePromotion.cpp
llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp
Modified: llvm/trunk/lib/Target/ARM64/ARM64AddressTypePromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/ARM64AddressTypePromotion.cpp?rev=205451&r1=205450&r2=205451&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/ARM64AddressTypePromotion.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/ARM64AddressTypePromotion.cpp Wed Apr 2 14:28:08 2014
@@ -371,7 +371,7 @@ ARM64AddressTypePromotion::propagateSign
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::mergeSEx
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;
Modified: llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp?rev=205451&r1=205450&r2=205451&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp Wed Apr 2 14:28:08 2014
@@ -420,7 +420,7 @@ static void reachingDefAlgorithm(Machine
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(InstrToIns
}
}
}
- 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 InstrToI
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 InstrToI
}
// 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);
}
More information about the llvm-commits
mailing list