Home | History | Annotate | Download | only in IPO

Lines Matching refs:Index

108 static bool canBeExternallyReferenced(const ModuleSummaryIndex &Index,
110 auto Summaries = Index.findGlobalValueSummaryList(GUID);
111 if (Summaries == Index.end())
126 static bool eligibleForImport(const ModuleSummaryIndex &Index,
138 return canBeExternallyReferenced(Index, VI.getGUID());
146 return canBeExternallyReferenced(Index, Edge.first.getGUID());
165 selectCallee(const ModuleSummaryIndex &Index,
191 if (!eligibleForImport(Index, *Summary))
206 const ModuleSummaryIndex &Index) {
207 auto CalleeSummaryList = Index.findGlobalValueSummaryList(GUID);
208 if (CalleeSummaryList == Index.end())
210 return selectCallee(Index, CalleeSummaryList->second, Threshold);
216 static void exportGlobalInModule(const ModuleSummaryIndex &Index,
222 auto SummaryList = Index.findGlobalValueSummaryList(GUID);
223 if (SummaryList == Index.end())
266 const FunctionSummary &Summary, const ModuleSummaryIndex &Index,
280 auto *CalleeSummary = selectCallee(GUID, Threshold, Index);
320 exportGlobalInModule(Index, ExportModulePath, CalleeGUID, ExportList);
324 exportGlobalInModule(Index, ExportModulePath, GUID, ExportList);
337 const GVSummaryMapTy &DefinedGVSummaries, const ModuleSummaryIndex &Index,
355 computeImportForFunction(*FuncSummary, Index, ImportInstrLimit,
369 computeImportForFunction(*Summary, Index, Threshold, DefinedGVSummaries,
376 /// Compute all the import and export for every module using the Index.
378 const ModuleSummaryIndex &Index,
387 ComputeImportForModule(DefinedGVSummaries.second, Index, ImportsForModule,
409 /// Compute all the imports for the given module in the Index.
411 StringRef ModulePath, const ModuleSummaryIndex &Index,
417 Index.collectDefinedFunctionsForModule(ModulePath, FunctionSummaryMap);
421 ComputeImportForModule(FunctionSummaryMap, Index, ImportList);
543 // recorded in the index using the original name.
557 // based on the index, rather than invoking internalizeModule.
562 // index.
659 if (renameModuleForThinLTO(*SrcModule, Index, &GlobalsToImport))
699 /// Parse the summary index out of an IR file and return the summary
700 /// index object if found, or nullptr if not.
725 /// Optional module summary index to use for importing, otherwise
727 const ModuleSummaryIndex *Index;
736 explicit FunctionImportPass(const ModuleSummaryIndex *Index = nullptr)
737 : ModulePass(ID), Index(Index) {}
743 if (SummaryFile.empty() && !Index)
748 if (Index)
749 report_fatal_error("error: -summary-file and index from frontend\n");
758 Index = IndexPtr.get();
763 ComputeCrossModuleImportForModule(M.getModuleIdentifier(), *Index,
768 if (renameModuleForThinLTO(M, *Index, nullptr)) {
777 FunctionImporter Importer(*Index, ModuleLoader);
791 Pass *createFunctionImportPass(const ModuleSummaryIndex *Index = nullptr) {
792 return new FunctionImportPass(Index);