Lines Matching defs:Index

204     const ModuleSummaryIndex &Index,
209 [&Index, CalleeSummaryList,
214 if (!Index.isGlobalValueLive(GVSummary))
274 selectCallee(const ModuleSummaryIndex &Index,
282 qualifyCalleeCandidates(Index, CalleeSummaryList, CallerModulePath);
321 const ModuleSummaryIndex &Index;
381 if (!GVS || !Index.canImportGlobalVar(GVS, /* AnalyzeRefs */ true) ||
407 if (!Index.isWriteOnly(GVS))
416 const ModuleSummaryIndex &Index, const GVSummaryMapTy &DefinedGVSummaries,
421 : Index(Index), DefinedGVSummaries(DefinedGVSummaries),
440 const ModuleSummaryIndex &Index;
446 const ModuleSummaryIndex &Index,
448 : IsPrevailing(IsPrevailing), Index(Index), ExportLists(ExportLists) {}
464 const ModuleSummaryIndex &Index,
492 GlobalsImporter GVI(Index, DefinedGVSummaries, IsPrevailing, ImportList,
507 qualifyCalleeCandidates(Index, VI.getSummaryList(), ModName);
593 const ModuleSummaryIndex &Index,
595 : ModuleImportsManager(IsPrevailing, Index, ExportLists) {
600 for (auto &I : Index) {
601 ValueInfo VI = Index.getValueInfo(I);
680 const ModuleSummaryIndex &Index,
685 new ModuleImportsManager(IsPrevailing, Index, ExportLists));
688 return std::make_unique<WorkloadImportsManager>(IsPrevailing, Index,
719 const FunctionSummary &Summary, const ModuleSummaryIndex &Index,
809 selectCallee(Index, VI.getSummaryList(), NewThreshold,
919 GlobalsImporter GVI(Index, DefinedGVSummaries, IsPrevailing, ImportList,
929 auto VI = Index.getValueInfo(GVSummary.first);
931 if (!Index.isGlobalValueLive(GVSummary.second)) {
941 computeImportForFunction(*FuncSummary, Index, ImportInstrLimit,
953 computeImportForFunction(*FS, Index, Threshold, DefinedGVSummaries,
984 static bool isGlobalVarSummary(const ModuleSummaryIndex &Index, ValueInfo VI) {
991 static bool isGlobalVarSummary(const ModuleSummaryIndex &Index,
993 if (const auto &VI = Index.getValueInfo(G))
994 return isGlobalVarSummary(Index, VI);
1000 numGlobalVarSummaries(const ModuleSummaryIndex &Index,
1004 if (isGlobalVarSummary(Index, VI.getGUID()))
1012 numGlobalVarSummaries(const ModuleSummaryIndex &Index,
1018 if (isGlobalVarSummary(Index, GUID))
1029 const ModuleSummaryIndex &Index,
1048 Index.findSummaryInModule(VI, ModulePath));
1049 return GVS && (Index.isReadOnly(GVS) || Index.isWriteOnly(GVS)) &&
1065 /// Compute all the import and export for every module using the Index.
1067 const ModuleSummaryIndex &Index,
1073 auto MIS = ModuleImportsManager::create(isPrevailing, Index, &ExportLists);
1112 if (!Index.isWriteOnly(GVS))
1136 assert(checkVariableImport(Index, ImportLists, ExportLists));
1143 unsigned NumGVS = numGlobalVarSummaries(Index, Exports);
1152 numGlobalVarSummaries(Index, Src.second, DefinedFS);
1165 static void dumpImportListForModule(const ModuleSummaryIndex &Index,
1173 unsigned NumGVSPerMod = numGlobalVarSummaries(Index, Src.second, DefinedFS);
1184 /// Compute all the imports for the given module using the Index.
1196 const ModuleSummaryIndex &Index,
1201 Index.collectDefinedFunctionsForModule(ModulePath, FunctionSummaryMap);
1205 auto MIS = ModuleImportsManager::create(isPrevailing, Index);
1209 dumpImportListForModule(Index, ModulePath, ImportList);
1213 /// Mark all external summaries in \p Index for import into the given module.
1219 StringRef ModulePath, const ModuleSummaryIndex &Index,
1221 for (const auto &GlobalList : Index) {
1244 dumpImportListForModule(Index, ModulePath, ImportList);
1252 void updateValueInfoForIndirectCalls(ModuleSummaryIndex &Index,
1257 auto GUID = Index.getGUIDFromOriginalID(EI.first.getGUID());
1261 auto VI = Index.getValueInfo(GUID);
1282 void llvm::updateIndirectCalls(ModuleSummaryIndex &Index) {
1283 for (const auto &Entry : Index) {
1286 updateValueInfoForIndirectCalls(Index, FS);
1292 ModuleSummaryIndex &Index,
1295 assert(!Index.withGlobalValueDeadStripping());
1300 updateIndirectCalls(Index);
1307 ValueInfo VI = Index.getValueInfo(GUID);
1315 for (const auto &Entry : Index) {
1316 auto VI = Index.getValueInfo(Entry);
1319 updateValueInfoForIndirectCalls(Index, FS);
1397 Index.setWithGlobalValueDeadStripping();
1399 unsigned DeadSymbols = Index.size() - LiveSymbols;
1408 ModuleSummaryIndex &Index,
1412 computeDeadSymbolsAndUpdateIndirectCalls(Index, GUIDPreservedSymbols,
1415 Index.propagateAttributes(GUIDPreservedSymbols);
1860 SrcModule->setPartialSampleProfileRatio(Index);
1863 if (renameModuleForThinLTO(*SrcModule, Index, ClearDSOLocalOnDeclarations,
1911 std::unique_ptr<ModuleSummaryIndex> Index = std::move(*IndexPtrOrErr);
1920 *Index, ImportList);
1923 isPrevailing, *Index, ImportList);
1929 for (auto &I : *Index) {
1938 if (renameModuleForThinLTO(M, *Index, /*ClearDSOLocalOnDeclarations=*/false,
1948 FunctionImporter Importer(*Index, ModuleLoader,