Lines Matching refs:Index

95 static bool findRefEdges(ModuleSummaryIndex &Index, const User *CurUser,  in findRefEdges()  argument
120 RefEdges.insert(Index.getOrInsertValueInfo(GV)); in findRefEdges()
267 ModuleSummaryIndex &Index, const Module &M, const Function &F, in computeFunctionSummary() argument
295 findRefEdges(Index, &F, RefEdges, Visited); in computeFunctionSummary()
352 RefEdges.insert(Index.getOrInsertValueInfo(GV)); in computeFunctionSummary()
354 findRefEdges(Index, U, RefEdges, Visited); in computeFunctionSummary()
358 findRefEdges(Index, &I, RefEdges, Visited); in computeFunctionSummary()
409 auto &ValueInfo = CallGraphEdges[Index.getOrInsertValueInfo( in computeFunctionSummary()
448 CallGraphEdges[Index.getOrInsertValueInfo(Callee)]; in computeFunctionSummary()
458 CallGraphEdges[Index.getOrInsertValueInfo(Candidate.Value)] in computeFunctionSummary()
501 unsigned StackIdIdx = Index.addOrGetStackIdIndex(*ContextIter); in computeFunctionSummary()
515 StackIdIndices.push_back(Index.addOrGetStackIdIndex(StackId)); in computeFunctionSummary()
521 Index.getOrInsertValueInfo(cast<GlobalValue>(CalledValue)); in computeFunctionSummary()
528 Index.addBlockCount(F.size()); in computeFunctionSummary()
537 findRefEdges(Index, I, Edges, Cache); in computeFunctionSummary()
588 CallGraphEdges[Index.getOrInsertValueInfo(I)].updateHotness( in computeFunctionSummary()
630 ParamAccesses = SSI->getParamAccesses(Index); in computeFunctionSummary()
640 Index.addGlobalValueSummary(F, std::move(FuncSummary)); in computeFunctionSummary()
649 const Module &M, ModuleSummaryIndex &Index, in findFuncPointers() argument
661 VTableFuncs.push_back({Index.getOrInsertValueInfo(GV), StartingOffset}); in findFuncPointers()
678 StartingOffset + Offset, M, Index, VTableFuncs); in findFuncPointers()
686 StartingOffset + i * EltSize, M, Index, VTableFuncs); in findFuncPointers()
692 static void computeVTableFuncs(ModuleSummaryIndex &Index, in computeVTableFuncs() argument
698 findFuncPointers(V.getInitializer(), /*StartingOffset=*/0, M, Index, in computeVTableFuncs()
716 recordTypeIdCompatibleVtableReferences(ModuleSummaryIndex &Index, in recordTypeIdCompatibleVtableReferences() argument
728 Index.getOrInsertTypeIdCompatibleVtableSummary(TypeId->getString()) in recordTypeIdCompatibleVtableReferences()
729 .push_back({Offset, Index.getOrInsertValueInfo(&V)}); in recordTypeIdCompatibleVtableReferences()
733 static void computeVariableSummary(ModuleSummaryIndex &Index, in computeVariableSummary() argument
740 bool HasBlockAddress = findRefEdges(Index, &V, RefEdges, Visited); in computeVariableSummary()
749 if (!Index.enableSplitLTOUnit()) { in computeVariableSummary()
754 computeVTableFuncs(Index, V, M, VTableFuncs); in computeVariableSummary()
757 recordTypeIdCompatibleVtableReferences(Index, V, Types); in computeVariableSummary()
777 Index.addGlobalValueSummary(V, std::move(GVarSummary)); in computeVariableSummary()
780 static void computeAliasSummary(ModuleSummaryIndex &Index, const GlobalAlias &A, in computeAliasSummary() argument
792 auto AliaseeVI = Index.getValueInfo(Aliasee->getGUID()); in computeAliasSummary()
799 Index.addGlobalValueSummary(A, std::move(AS)); in computeAliasSummary()
803 static void setLiveRoot(ModuleSummaryIndex &Index, StringRef Name) { in setLiveRoot() argument
804 if (ValueInfo VI = Index.getValueInfo(GlobalValue::getGUID(Name))) in setLiveRoot()
823 ModuleSummaryIndex Index(/*HaveGVs=*/true, EnableSplitLTOUnit, UnifiedLTO); in buildModuleSummaryIndex() local
897 Index.addGlobalValueSummary(*GV, std::move(Summary)); in buildModuleSummaryIndex()
906 Index.addGlobalValueSummary(*GV, std::move(Summary)); in buildModuleSummaryIndex()
934 computeFunctionSummary(Index, M, F, BFI, PSI, DT, in buildModuleSummaryIndex()
945 computeVariableSummary(Index, G, CantBePromoted, M, Types); in buildModuleSummaryIndex()
951 computeAliasSummary(Index, A, CantBePromoted); in buildModuleSummaryIndex()
955 I.applyAlongResolverPath([&Index](const GlobalValue &GV) { in buildModuleSummaryIndex()
956 Index.getGlobalValueSummary(GV)->setLive(true); in buildModuleSummaryIndex()
961 auto *Summary = Index.getGlobalValueSummary(*V); in buildModuleSummaryIndex()
969 setLiveRoot(Index, "llvm.used"); in buildModuleSummaryIndex()
970 setLiveRoot(Index, "llvm.compiler.used"); in buildModuleSummaryIndex()
971 setLiveRoot(Index, "llvm.global_ctors"); in buildModuleSummaryIndex()
972 setLiveRoot(Index, "llvm.global_dtors"); in buildModuleSummaryIndex()
973 setLiveRoot(Index, "llvm.global.annotations"); in buildModuleSummaryIndex()
975 for (auto &GlobalList : Index) { in buildModuleSummaryIndex()
1013 Index.exportToDot(OSDot, {}); in buildModuleSummaryIndex()
1016 return Index; in buildModuleSummaryIndex()
1062 Index.emplace(buildModuleSummaryIndex( in runOnModule()
1080 Index.reset(); in doFinalization()
1094 const ModuleSummaryIndex *Index) in ImmutableModuleSummaryIndexWrapperPass() argument
1095 : ImmutablePass(ID), Index(Index) { in ImmutableModuleSummaryIndexWrapperPass()
1106 const ModuleSummaryIndex *Index) { in createImmutableModuleSummaryIndexWrapperPass() argument
1107 return new ImmutableModuleSummaryIndexWrapperPass(Index); in createImmutableModuleSummaryIndexWrapperPass()