Lines Matching defs:Index
221 const ModuleSummaryIndex &Index,
226 [&Index, CalleeSummaryList,
231 if (!Index.isGlobalValueLive(GVSummary))
292 selectCallee(const ModuleSummaryIndex &Index,
300 qualifyCalleeCandidates(Index, CalleeSummaryList, CallerModulePath);
385 const ModuleSummaryIndex &Index;
437 !Index.canImportGlobalVar(GVS, /* AnalyzeRefs */ true,
463 if (!Index.isWriteOnly(GVS))
472 const ModuleSummaryIndex &Index, const GVSummaryMapTy &DefinedGVSummaries,
477 : Index(Index), DefinedGVSummaries(DefinedGVSummaries),
496 const ModuleSummaryIndex &Index;
502 const ModuleSummaryIndex &Index,
504 : IsPrevailing(IsPrevailing), Index(Index), ExportLists(ExportLists) {}
520 const ModuleSummaryIndex &Index,
548 GlobalsImporter GVI(Index, DefinedGVSummaries, IsPrevailing, ImportList,
563 qualifyCalleeCandidates(Index, VI.getSummaryList(), ModName);
649 for (auto &I : Index) {
650 ValueInfo VI = Index.getValueInfo(I);
739 auto RootVI = Index.getValueInfo(RootGuid);
758 if (auto VI = Index.getValueInfo(Guid))
767 const ModuleSummaryIndex &Index,
769 : ModuleImportsManager(IsPrevailing, Index, ExportLists) {
795 const ModuleSummaryIndex &Index,
800 new ModuleImportsManager(IsPrevailing, Index, ExportLists));
803 return std::make_unique<WorkloadImportsManager>(IsPrevailing, Index,
834 const FunctionSummary &Summary, const ModuleSummaryIndex &Index,
924 selectCallee(Index, VI.getSummaryList(), NewThreshold,
1023 GlobalsImporter GVI(Index, DefinedGVSummaries, IsPrevailing, ImportList,
1033 auto VI = Index.getValueInfo(GVSummary.first);
1035 if (!Index.isGlobalValueLive(GVSummary.second)) {
1045 computeImportForFunction(*FuncSummary, Index, ImportInstrLimit,
1057 computeImportForFunction(*FS, Index, Threshold, DefinedGVSummaries,
1088 static bool isGlobalVarSummary(const ModuleSummaryIndex &Index, ValueInfo VI) {
1095 static bool isGlobalVarSummary(const ModuleSummaryIndex &Index,
1097 if (const auto &VI = Index.getValueInfo(G))
1098 return isGlobalVarSummary(Index, VI);
1104 numGlobalVarSummaries(const ModuleSummaryIndex &Index,
1108 if (isGlobalVarSummary(Index, VI.getGUID()))
1121 collectImportStatistics(const ModuleSummaryIndex &Index,
1128 if (isGlobalVarSummary(Index, GUID))
1139 const ModuleSummaryIndex &Index,
1157 Index.findSummaryInModule(VI, ModulePath));
1158 return GVS && (Index.isReadOnly(GVS) || Index.isWriteOnly(GVS)) &&
1174 /// Compute all the import and export for every module using the Index.
1176 const ModuleSummaryIndex &Index,
1182 auto MIS = ModuleImportsManager::create(isPrevailing, Index, &ExportLists);
1221 if (!Index.isWriteOnly(GVS))
1245 assert(checkVariableImport(Index, ImportLists, ExportLists));
1252 unsigned NumGVS = numGlobalVarSummaries(Index, Exports);
1254 collectImportStatistics(Index, ModuleImports.second);
1273 static void dumpImportListForModule(const ModuleSummaryIndex &Index,
1277 collectImportStatistics(Index, ImportList);
1292 /// Compute all the imports for the given module using the Index.
1304 const ModuleSummaryIndex &Index,
1309 Index.collectDefinedFunctionsForModule(ModulePath, FunctionSummaryMap);
1313 auto MIS = ModuleImportsManager::create(isPrevailing, Index);
1317 dumpImportListForModule(Index, ModulePath, ImportList);
1321 /// Mark all external summaries in \p Index for import into the given module.
1327 StringRef ModulePath, const ModuleSummaryIndex &Index,
1329 for (const auto &GlobalList : Index) {
1346 dumpImportListForModule(Index, ModulePath, ImportList);
1354 void updateValueInfoForIndirectCalls(ModuleSummaryIndex &Index,
1359 auto GUID = Index.getGUIDFromOriginalID(EI.first.getGUID());
1363 auto VI = Index.getValueInfo(GUID);
1384 void llvm::updateIndirectCalls(ModuleSummaryIndex &Index) {
1385 for (const auto &Entry : Index) {
1388 updateValueInfoForIndirectCalls(Index, FS);
1394 ModuleSummaryIndex &Index,
1397 assert(!Index.withGlobalValueDeadStripping());
1402 updateIndirectCalls(Index);
1409 ValueInfo VI = Index.getValueInfo(GUID);
1417 for (const auto &Entry : Index) {
1418 auto VI = Index.getValueInfo(Entry);
1421 updateValueInfoForIndirectCalls(Index, FS);
1499 Index.setWithGlobalValueDeadStripping();
1501 unsigned DeadSymbols = Index.size() - LiveSymbols;
1510 ModuleSummaryIndex &Index,
1514 computeDeadSymbolsAndUpdateIndirectCalls(Index, GUIDPreservedSymbols,
1517 Index.propagateAttributes(GUIDPreservedSymbols);
1950 SrcModule->setPartialSampleProfileRatio(Index);
1953 renameModuleForThinLTO(*SrcModule, Index, ClearDSOLocalOnDeclarations,
2000 std::unique_ptr<ModuleSummaryIndex> Index = std::move(*IndexPtrOrErr);
2010 *Index, ImportList);
2013 isPrevailing, *Index, ImportList);
2019 for (auto &I : *Index) {
2028 renameModuleForThinLTO(M, *Index, /*ClearDSOLocalOnDeclarations=*/false,
2035 FunctionImporter Importer(*Index, ModuleLoader,