mergeSExts(ValToSExtendedUses, ToRemove);
// Remove all instructions marked as ToRemove.
- for (auto I: ToRemove)
+ for (Instruction *I: ToRemove)
I->eraseFromParent();
return LocalChange;
}
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;
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());
}
}
}
- 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
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());
}
// 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);
}