// Removes an observer from the list and does nothing if observer is not
// present.
void removeObserver(GISelChangeObserver *O) {
- auto It = std::find(Observers.begin(), Observers.end(), O);
+ auto It = llvm::find(Observers, O);
if (It != Observers.end())
Observers.erase(It);
}
case FrameHelperType::Prolog:
case FrameHelperType::PrologFrame: {
// Compute the remaining SP adjust beyond FP/LR.
- auto LRIdx = std::distance(
- Regs.begin(), std::find(Regs.begin(), Regs.end(), AArch64::LR));
+ auto LRIdx = std::distance(Regs.begin(), llvm::find(Regs, AArch64::LR));
// If the register stored to the lowest address is not LR, we must subtract
// more from SP here.
// Make DeterminatorBB the first element in Path.
PathType Path = TPath.getPath();
- auto ItDet = std::find(Path.begin(), Path.end(), DeterminatorBB);
+ auto ItDet = llvm::find(Path, DeterminatorBB);
std::rotate(Path.begin(), ItDet, Path.end());
bool IsDetBBSeen = false;
// Otherwise update Metrics for all blocks that will be cloned. If any
// block is already cloned and would be reused, don't double count it.
- auto DetIt = std::find(PathBBs.begin(), PathBBs.end(), Determinator);
+ auto DetIt = llvm::find(PathBBs, Determinator);
for (auto BBIt = DetIt; BBIt != PathBBs.end(); BBIt++) {
BB = *BBIt;
VisitedBB = getClonedBB(BB, NextState, DuplicateMap);
if (PathBBs.front() == Determinator)
PathBBs.pop_front();
- auto DetIt = std::find(PathBBs.begin(), PathBBs.end(), Determinator);
+ auto DetIt = llvm::find(PathBBs, Determinator);
auto Prev = std::prev(DetIt);
BasicBlock *PrevBB = *Prev;
for (auto BBIt = DetIt; BBIt != PathBBs.end(); BBIt++) {
/// in the set of values referenced by the expression.
void pushLocation(llvm::Value *V) {
Expr.push_back(llvm::dwarf::DW_OP_LLVM_arg);
- auto *It = std::find(LocationOps.begin(), LocationOps.end(), V);
+ auto *It = llvm::find(LocationOps, V);
unsigned ArgIndex = 0;
if (It != LocationOps.end()) {
ArgIndex = std::distance(LocationOps.begin(), It);