[LLVMdev] Proposal: release MDNodes for source modules (LTO+debug info)

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Nov 13 19:58:04 PST 2013


> It sounds like the linker could call lto_module_dispose() right after
> lto_codegen_add_module() to help reduce the memory footprint.  That would be
> a simple linker change.  A slightly larger linker change would be to
> immediately call lto_codegen_add_module() right after
> lto_module_create_from_memory(), then lto_module_dispose().  That is, never
> have any unmerged modules laying around.
>
> I have no idea is these sort of changes work for the gold plugin.

The gold plugin calls lto_codegen_add_module/lto_module_dispose early.
So it looks like Chandler's idea would be a win for gold but a loss
for ld64 right now.

Cheers,
Rafael



More information about the llvm-dev mailing list