[llvm] r279532 - [ThinLTO] Make sure the Context used for the ThinLTO backend has all the appropriate options
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 23 11:21:13 PDT 2016
Indeed: r279545
Thanks!
—
Mehdi
> On Aug 23, 2016, at 10:21 AM, Xinliang David Li <xinliangli at gmail.com> wrote:
>
> Is it possible to add some test?
>
> David
>
> On Tue, Aug 23, 2016 at 9:53 AM, Mehdi Amini via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
> Author: mehdi_amini
> Date: Tue Aug 23 11:53:34 2016
> New Revision: 279532
>
> URL: http://llvm.org/viewvc/llvm-project?rev=279532&view=rev <http://llvm.org/viewvc/llvm-project?rev=279532&view=rev>
> Log:
> [ThinLTO] Make sure the Context used for the ThinLTO backend has all the appropriate options
>
> An important performance setting on the LLVMContext for LTO is
> enableDebugTypeODRUniquing(), this adds an automatic merging of
> debug information in the context based on type ids.
>
> Also, the lto::Config includes a diagnostic handler that needs to
> be set on the Context, as well as the setDiscardValueNames() setting.
>
> Modified:
> llvm/trunk/lib/LTO/LTO.cpp
> llvm/trunk/lib/LTO/LTOBackend.cpp
>
> Modified: llvm/trunk/lib/LTO/LTO.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTO.cpp?rev=279532&r1=279531&r2=279532&view=diff <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTO.cpp?rev=279532&r1=279531&r2=279532&view=diff>
> ==============================================================================
> --- llvm/trunk/lib/LTO/LTO.cpp (original)
> +++ llvm/trunk/lib/LTO/LTO.cpp Tue Aug 23 11:53:34 2016
> @@ -468,7 +468,7 @@ public:
> const FunctionImporter::ImportMapTy &ImportList,
> const GVSummaryMapTy &DefinedGlobals,
> MapVector<StringRef, MemoryBufferRef> &ModuleMap) {
> - LLVMContext BackendContext;
> + LTOLLVMContext BackendContext(Conf);
>
> ErrorOr<std::unique_ptr<Module>> MOrErr =
> parseBitcodeFile(MBRef, BackendContext);
>
> Modified: llvm/trunk/lib/LTO/LTOBackend.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOBackend.cpp?rev=279532&r1=279531&r2=279532&view=diff <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOBackend.cpp?rev=279532&r1=279531&r2=279532&view=diff>
> ==============================================================================
> --- llvm/trunk/lib/LTO/LTOBackend.cpp (original)
> +++ llvm/trunk/lib/LTO/LTOBackend.cpp Tue Aug 23 11:53:34 2016
> @@ -271,6 +271,8 @@ Error lto::thinBackend(Config &Conf, uns
> return Error();
>
> auto ModuleLoader = [&](StringRef Identifier) {
> + assert(Mod.getContext().isODRUniquingDebugTypes() &&
> + "ODR Type uniquing shoudl be enabled on the context");
> return std::move(getLazyBitcodeModule(MemoryBuffer::getMemBuffer(
> ModuleMap[Identifier], false),
> Mod.getContext(),
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160823/298c624b/attachment.html>
More information about the llvm-commits
mailing list