Lines Matching refs:Index

102 static bool findRefEdges(ModuleSummaryIndex &Index, const User *CurUser,  in findRefEdges()  argument
137 RefEdges.insert(Index.getOrInsertValueInfo(GV)); in findRefEdges()
155 RefEdges.insert(Index.getOrInsertValueInfo(/* VTableGUID = */ in findRefEdges()
298 ModuleSummaryIndex &Index, const Module &M, const Function &F, in computeFunctionSummary() argument
327 findRefEdges(Index, &F, RefEdges, Visited, HasLocalIFuncCallOrRef); in computeFunctionSummary()
383 RefEdges.insert(Index.getOrInsertValueInfo(GV)); in computeFunctionSummary()
385 findRefEdges(Index, U, RefEdges, Visited, HasLocalIFuncCallOrRef); in computeFunctionSummary()
389 findRefEdges(Index, &I, RefEdges, Visited, HasLocalIFuncCallOrRef); in computeFunctionSummary()
440 auto &ValueInfo = CallGraphEdges[Index.getOrInsertValueInfo( in computeFunctionSummary()
479 CallGraphEdges[Index.getOrInsertValueInfo(Callee)]; in computeFunctionSummary()
489 CallGraphEdges[Index.getOrInsertValueInfo(Candidate.Value)] in computeFunctionSummary()
533 unsigned StackIdIdx = Index.addOrGetStackIdIndex(*ContextIter); in computeFunctionSummary()
556 StackIdIndices.push_back(Index.addOrGetStackIdIndex(StackId)); in computeFunctionSummary()
562 Index.getOrInsertValueInfo(cast<GlobalValue>(CalledValue)); in computeFunctionSummary()
569 Index.addBlockCount(F.size()); in computeFunctionSummary()
578 findRefEdges(Index, I, Edges, Cache, HasLocalIFuncCallOrRef); in computeFunctionSummary()
629 CallGraphEdges[Index.getOrInsertValueInfo(I)].updateHotness( in computeFunctionSummary()
672 ParamAccesses = SSI->getParamAccesses(Index); in computeFunctionSummary()
682 Index.addGlobalValueSummary(F, std::move(FuncSummary)); in computeFunctionSummary()
691 const Module &M, ModuleSummaryIndex &Index, in findFuncPointers() argument
704 VTableFuncs.push_back({Index.getOrInsertValueInfo(GV), StartingOffset}); in findFuncPointers()
721 StartingOffset + Offset, M, Index, VTableFuncs, OrigGV); in findFuncPointers()
729 StartingOffset + i * EltSize, M, Index, VTableFuncs, in findFuncPointers()
755 findFuncPointers(LHS, StartingOffset, M, Index, VTableFuncs, OrigGV); in findFuncPointers()
762 static void computeVTableFuncs(ModuleSummaryIndex &Index, in computeVTableFuncs() argument
768 findFuncPointers(V.getInitializer(), /*StartingOffset=*/0, M, Index, in computeVTableFuncs()
786 recordTypeIdCompatibleVtableReferences(ModuleSummaryIndex &Index, in recordTypeIdCompatibleVtableReferences() argument
798 Index.getOrInsertTypeIdCompatibleVtableSummary(TypeId->getString()) in recordTypeIdCompatibleVtableReferences()
799 .push_back({Offset, Index.getOrInsertValueInfo(&V)}); in recordTypeIdCompatibleVtableReferences()
803 static void computeVariableSummary(ModuleSummaryIndex &Index, in computeVariableSummary() argument
812 findRefEdges(Index, &V, RefEdges, Visited, RefLocalIFunc); in computeVariableSummary()
823 if (!Index.enableSplitLTOUnit()) { in computeVariableSummary()
828 computeVTableFuncs(Index, V, M, VTableFuncs); in computeVariableSummary()
831 recordTypeIdCompatibleVtableReferences(Index, V, Types); in computeVariableSummary()
851 Index.addGlobalValueSummary(V, std::move(GVarSummary)); in computeVariableSummary()
854 static void computeAliasSummary(ModuleSummaryIndex &Index, const GlobalAlias &A, in computeAliasSummary() argument
867 auto AliaseeVI = Index.getValueInfo(Aliasee->getGUID()); in computeAliasSummary()
874 Index.addGlobalValueSummary(A, std::move(AS)); in computeAliasSummary()
878 static void setLiveRoot(ModuleSummaryIndex &Index, StringRef Name) { in setLiveRoot() argument
879 if (ValueInfo VI = Index.getValueInfo(GlobalValue::getGUID(Name))) in setLiveRoot()
898 ModuleSummaryIndex Index(/*HaveGVs=*/true, EnableSplitLTOUnit, UnifiedLTO); in buildModuleSummaryIndex() local
973 Index.addGlobalValueSummary(*GV, std::move(Summary)); in buildModuleSummaryIndex()
982 Index.addGlobalValueSummary(*GV, std::move(Summary)); in buildModuleSummaryIndex()
1010 computeFunctionSummary(Index, M, F, BFI, PSI, DT, in buildModuleSummaryIndex()
1021 computeVariableSummary(Index, G, CantBePromoted, M, Types); in buildModuleSummaryIndex()
1027 computeAliasSummary(Index, A, CantBePromoted); in buildModuleSummaryIndex()
1031 I.applyAlongResolverPath([&Index](const GlobalValue &GV) { in buildModuleSummaryIndex()
1032 Index.getGlobalValueSummary(GV)->setLive(true); in buildModuleSummaryIndex()
1037 auto *Summary = Index.getGlobalValueSummary(*V); in buildModuleSummaryIndex()
1045 setLiveRoot(Index, "llvm.used"); in buildModuleSummaryIndex()
1046 setLiveRoot(Index, "llvm.compiler.used"); in buildModuleSummaryIndex()
1047 setLiveRoot(Index, "llvm.global_ctors"); in buildModuleSummaryIndex()
1048 setLiveRoot(Index, "llvm.global_dtors"); in buildModuleSummaryIndex()
1049 setLiveRoot(Index, "llvm.global.annotations"); in buildModuleSummaryIndex()
1051 for (auto &GlobalList : Index) { in buildModuleSummaryIndex()
1089 Index.exportToDot(OSDot, {}); in buildModuleSummaryIndex()
1092 return Index; in buildModuleSummaryIndex()
1138 Index.emplace(buildModuleSummaryIndex( in runOnModule()
1156 Index.reset(); in doFinalization()
1170 const ModuleSummaryIndex *Index) in ImmutableModuleSummaryIndexWrapperPass() argument
1171 : ImmutablePass(ID), Index(Index) { in ImmutableModuleSummaryIndexWrapperPass()
1182 const ModuleSummaryIndex *Index) { in createImmutableModuleSummaryIndexWrapperPass() argument
1183 return new ImmutableModuleSummaryIndexWrapperPass(Index); in createImmutableModuleSummaryIndexWrapperPass()