[PATCH] D12205: LTO: Simplify merged module ownership.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 17:15:46 PDT 2015


On Fri, Aug 21, 2015 at 04:50:08PM -0700, Duncan P. N. Exon Smith wrote:
> Sorry for the delay.  Mehdi and I looked through the code more
> carefully together.  The call-site for lto_module_dispose() that I
> found seems to be unreachable when using lto_codegen_set_module().
> 
> This means the code generator should be safe to truly take
> ownership of the module (as the documentation suggested).  If you
> post an updated patch we can confirm locally that it works.

Thanks for taking the time to look into this. I have uploaded a new
version of the patch that restores the ownership semantics from
my original patch.

> (Just so it doesn't get lost in all this back and forth: we still
> need to support ld64's call to lto_codegen_write_merged_modules()
> that occurs after CodeGen; I think you had a solution in another
> branch of the thread?)

Yes, the new patch supports this by removing the call to OwnedModule.reset().
(The parallel CG solution I mentioned will be posted in a separate patch.)

Thanks,
-- 
Peter


More information about the llvm-commits mailing list