Lines Matching full:auto
84 for (const auto *E : Edges) { in getEdgeSum()
105 for (auto *I : Edges) in setSingleUnknownEdgeCount()
188 if (auto *E = OutEdges[Index]) in getEdgeCount()
215 for (const auto &BBInfo : BBInfos) in allCountersAreAssigned()
218 for (const auto &EdgeInfo : EdgeInfos) in allCountersAreAssigned()
232 const auto *BB = Worklist.front(); in allTakenPathsExit()
246 const auto &BBInfo = getBBInfo(*BB); in allTakenPathsExit()
248 for (auto I = 0U; I < BB->getTerminator()->getNumSuccessors(); ++I) { in allTakenPathsExit()
249 const auto *Succ = BB->getTerminator()->getSuccessor(I); in allTakenPathsExit()
264 for (const auto &BB : F) { in allNonColdSelectsHaveProfile()
266 for (const auto &I : BB) { in allNonColdSelectsHaveProfile()
267 if (const auto *SI = dyn_cast<SelectInst>(&I)) { in allNonColdSelectsHaveProfile()
268 if (const auto *Inst = CtxProfAnalysis::getSelectInstrumentation( in allNonColdSelectsHaveProfile()
270 auto Index = Inst->getIndex()->getZExtValue(); in allNonColdSelectsHaveProfile()
288 for (const auto &BB : F) { in propagateCounterValues()
289 auto &Info = getBBInfo(BB); in propagateCounterValues()
317 for (const auto &BB : F) { in ProfileAnnotatorImpl()
319 if (auto *Ins = CtxProfAnalysis::getBBInstrumentation( in ProfileAnnotatorImpl()
321 auto Index = Ins->getIndex()->getZExtValue(); in ProfileAnnotatorImpl()
332 auto [It, Ins] = in ProfileAnnotatorImpl()
337 NrEdges += llvm::count_if(successors(&BB), [&](const auto *Succ) { in ProfileAnnotatorImpl()
343 for (const auto &BB : F) { in ProfileAnnotatorImpl()
344 auto &Info = getBBInfo(BB); in ProfileAnnotatorImpl()
345 for (auto I = 0U; I < BB.getTerminator()->getNumSuccessors(); ++I) { in ProfileAnnotatorImpl()
346 const auto *Succ = BB.getTerminator()->getSuccessor(I); in ProfileAnnotatorImpl()
348 auto &EI = EdgeInfos.emplace_back(getBBInfo(BB), getBBInfo(*Succ)); in ProfileAnnotatorImpl()
378 const auto &BBInfo = PImpl->getBBInfo(*SI.getParent()); in getSelectInstrProfile()
383 auto *Step = CtxProfAnalysis::getSelectInstrumentation(SI); in getSelectInstrProfile()
386 auto Index = Step->getIndex()->getZExtValue(); in getSelectInstrProfile()
392 auto TotalCount = BBInfo.getCount(); in getSelectInstrProfile()
406 auto *Term = BB.getTerminator(); in getOutgoingBranchWeights()
409 const auto &BBInfo = PImpl->getBBInfo(BB); in getOutgoingBranchWeights()
422 for (auto &F : M.functions()) { in run()
441 auto *MD = F.getMetadata(GUIDMetadataName); in getGUID()
464 if (auto EC = MB.getError()) { in run()
470 auto MaybeProfiles = Reader.loadProfiles(); in run()
481 auto DetermineRootsInModule = [&M]() -> const DenseSet<GlobalValue::GUID> { in run()
483 auto ModName = M.getName(); in run()
484 auto Filename = sys::path::filename(ModName); in run()
495 const auto ProfileRootsInModule = DetermineRootsInModule(); in run()
505 for (auto &[RootGuid, _] : in run()
513 for (const auto &F : M) { in run()
516 auto GUID = AssignGUIDPass::getGUID(F); in run()
518 const auto &Entry = F.begin(); in run()
520 for (const auto &I : *Entry) in run()
521 if (auto *C = dyn_cast<InstrProfIncrementInst>(&I)) { in run()
529 for (const auto &BB : F) in run()
530 for (const auto &I : BB) in run()
531 if (auto *C = dyn_cast<InstrProfCallsite>(&I)) { in run()
536 auto [It, Ins] = Result.FuncInfo.insert( in run()
552 if (auto It = FuncInfo.find(AssignGUIDPass::getGUID(F)); It != FuncInfo.end()) in getDefinedFunctionGUID()
570 for (const auto &[Guid, FuncInfo] : C.FuncInfo) in run()
584 auto Flat = C.flatten(); in run()
585 for (const auto &[Guid, Counters] : Flat) { in run()
587 for (auto V : Counters) in run()
597 for (auto *Prev = CB.getPrevNode(); Prev; Prev = Prev->getPrevNode()) { in getCallsiteInstrumentation()
598 if (auto *IPC = dyn_cast<InstrProfCallsite>(Prev)) in getCallsiteInstrumentation()
608 for (auto &I : BB) in getBBInstrumentation()
609 if (auto *Incr = dyn_cast<InstrProfIncrementInst>(&I)) in getBBInstrumentation()
619 if (auto *Step = dyn_cast<InstrProfIncrementInstStep>(Prev)) in getSelectInstrumentation()
627 std::function<void(ProfTy &)> Traverser = [&](auto &Ctx) { in preorderVisitOneRoot()
629 for (auto &[_, SubCtxSet] : Ctx.callsites()) in preorderVisitOneRoot()
630 for (auto &[__, Subctx] : SubCtxSet) in preorderVisitOneRoot()
639 for (auto &[_, P] : Profiles) in preorderVisit()
647 for (auto &[Guid, FI] : FuncInfo) in initIndex()
651 auto InsertIt = InsertionPoints.find(Ctx.guid()); in initIndex()
673 for (auto *Node = FuncInfo.find(G)->second.Index.Next; Node; in update()
684 for (const auto *Node = FuncInfo.find(G)->second.Index.Next; Node; in visit()
691 auto Accummulate = [](SmallVectorImpl<uint64_t> &Into, in flatten()
703 for (const auto &[_, CtxRoot] : Profiles.Contexts) { in flatten()
710 for (const auto &[G, Unh] : CtxRoot.getUnhandled()) in flatten()
714 for (const auto &[G, FC] : Profiles.FlatProfiles) in flatten()
722 for (const auto &[_, CtxRoot] : Profiles.Contexts) { in flattenVirtCalls()
726 auto &Targets = Ret[Ctx.guid()]; in flattenVirtCalls()
727 for (const auto &[ID, SubctxSet] : Ctx.callsites()) in flattenVirtCalls()
728 for (const auto &Subctx : SubctxSet) in flattenVirtCalls()
739 const auto *Instr = CtxProfAnalysis::getCallsiteInstrumentation(IC); in collectIndirectCallPromotionList()
746 const auto &Targets = Ctx.callsites().find(CallID); in collectIndirectCallPromotionList()
749 for (const auto &[Guid, _] : Targets->second) in collectIndirectCallPromotionList()
750 if (auto Name = Profile.getFunctionName(Guid); !Name.empty()) in collectIndirectCallPromotionList()
751 if (auto *Target = M.getFunction(Name)) in collectIndirectCallPromotionList()