diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:21 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-06 20:13:21 +0000 |
commit | 7e7b6700743285c0af506ac6299ddf82ebd434b9 (patch) | |
tree | 578d2ea1868b77f3dff145df7f8f3fe73272c09e /include/llvm/Transforms/IPO/FunctionImport.h | |
parent | 4b570baa7e867c652fa7d690585098278082fae9 (diff) |
Diffstat (limited to 'include/llvm/Transforms/IPO/FunctionImport.h')
-rw-r--r-- | include/llvm/Transforms/IPO/FunctionImport.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/llvm/Transforms/IPO/FunctionImport.h b/include/llvm/Transforms/IPO/FunctionImport.h index d7acbe883c5d..eaea092c9179 100644 --- a/include/llvm/Transforms/IPO/FunctionImport.h +++ b/include/llvm/Transforms/IPO/FunctionImport.h @@ -86,11 +86,15 @@ public: /// \p ExportLists contains for each Module the set of globals (GUID) that will /// be imported by another module, or referenced by such a function. I.e. this /// is the set of globals that need to be promoted/renamed appropriately. +/// +/// \p DeadSymbols (optional) contains a list of GUID that are deemed "dead" and +/// will be ignored for the purpose of importing. void ComputeCrossModuleImport( const ModuleSummaryIndex &Index, const StringMap<GVSummaryMapTy> &ModuleToDefinedGVSummaries, StringMap<FunctionImporter::ImportMapTy> &ImportLists, - StringMap<FunctionImporter::ExportSetTy> &ExportLists); + StringMap<FunctionImporter::ExportSetTy> &ExportLists, + const DenseSet<GlobalValue::GUID> *DeadSymbols = nullptr); /// Compute all the imports for the given module using the Index. /// @@ -100,6 +104,13 @@ void ComputeCrossModuleImportForModule( StringRef ModulePath, const ModuleSummaryIndex &Index, FunctionImporter::ImportMapTy &ImportList); +/// Compute all the symbols that are "dead": i.e these that can't be reached +/// in the graph from any of the given symbols listed in +/// \p GUIDPreservedSymbols. +DenseSet<GlobalValue::GUID> +computeDeadSymbols(const ModuleSummaryIndex &Index, + const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols); + /// Compute the set of summaries needed for a ThinLTO backend compilation of /// \p ModulePath. // |