diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:51:42 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:51:42 +0000 |
commit | 1d5ae1026e831016fc29fd927877c86af904481f (patch) | |
tree | 2cdfd12620fcfa5d9e4a0389f85368e8e36f63f9 /include/llvm/LTO | |
parent | e6d1592492a3a379186bfb02bd0f4eda0669c0d5 (diff) |
Notes
Diffstat (limited to 'include/llvm/LTO')
-rw-r--r-- | include/llvm/LTO/Config.h | 2 | ||||
-rw-r--r-- | include/llvm/LTO/LTO.h | 10 | ||||
-rw-r--r-- | include/llvm/LTO/legacy/LTOCodeGenerator.h | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/include/llvm/LTO/Config.h b/include/llvm/LTO/Config.h index fb107e3fbe02..daa6585b1113 100644 --- a/include/llvm/LTO/Config.h +++ b/include/llvm/LTO/Config.h @@ -226,7 +226,7 @@ struct LTOLLVMContext : LLVMContext { setDiscardValueNames(C.ShouldDiscardValueNames); enableDebugTypeODRUniquing(); setDiagnosticHandler( - llvm::make_unique<LTOLLVMDiagnosticHandler>(&DiagHandler), true); + std::make_unique<LTOLLVMDiagnosticHandler>(&DiagHandler), true); } DiagnosticHandlerFunction DiagHandler; }; diff --git a/include/llvm/LTO/LTO.h b/include/llvm/LTO/LTO.h index ca0a8b64523a..0a1e3e1d0e42 100644 --- a/include/llvm/LTO/LTO.h +++ b/include/llvm/LTO/LTO.h @@ -59,7 +59,9 @@ void thinLTOResolvePrevailingInIndex( /// must apply the changes to the Module via thinLTOInternalizeModule. void thinLTOInternalizeAndPromoteInIndex( ModuleSummaryIndex &Index, - function_ref<bool(StringRef, GlobalValue::GUID)> isExported); + function_ref<bool(StringRef, GlobalValue::GUID)> isExported, + function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)> + isPrevailing); /// Computes a unique hash for the Module considering the current list of /// export/import and other global analysis results. @@ -296,6 +298,10 @@ public: /// Cache) for each task identifier. Error run(AddStreamFn AddStream, NativeObjectCache Cache = nullptr); + /// Static method that returns a list of libcall symbols that can be generated + /// by LTO but might not be visible from bitcode symbol table. + static ArrayRef<const char*> getRuntimeLibcallSymbols(); + private: Config Conf; @@ -303,7 +309,7 @@ private: RegularLTOState(unsigned ParallelCodeGenParallelismLevel, Config &Conf); struct CommonResolution { uint64_t Size = 0; - unsigned Align = 0; + MaybeAlign Align; /// Record if at least one instance of the common was marked as prevailing bool Prevailing = false; }; diff --git a/include/llvm/LTO/legacy/LTOCodeGenerator.h b/include/llvm/LTO/legacy/LTOCodeGenerator.h index d3cb4c8b79a0..8718df4b88e6 100644 --- a/include/llvm/LTO/legacy/LTOCodeGenerator.h +++ b/include/llvm/LTO/legacy/LTOCodeGenerator.h @@ -113,7 +113,7 @@ struct LTOCodeGenerator { ShouldRestoreGlobalsLinkage = Value; } - void addMustPreserveSymbol(StringRef Sym) { MustPreserveSymbols[Sym] = 1; } + void addMustPreserveSymbol(StringRef Sym) { MustPreserveSymbols.insert(Sym); } /// Pass options to the driver and optimization passes. /// |