[PATCH] Improve linker performance (v2)

James Molloy James.Molloy at arm.com
Thu May 23 08:10:08 PDT 2013


Hi,

A while back I submitted a patch to improve linker performance when lazily linking functions (r178130). It got reverted in r178156 by Bill Wendling because it broke a smooshlab buildbot. I didn't notice for a while because I wasn't on the fail mail and I fail at reading llvm-commits regularly enough :(

I replicated the failure smooshlab found, and realised there was a flaw in how I'd implemented lazy linking. I've attached a new patch with a changed approach, and would appreciate a review. The new approach is to extend RemapInstruction and friends to take an optional extra class ValueMaterializer, which can be subclassed to generate Value*s on demand. This allows the linker to only generate Function*s when it needs to, and increases performance by around 45% when linking large modules with many lazy linked functions of which few get used (such as CL kernels and built in function libraries).

This patch passes the LTO/Gold build it failed on before, and passes the LNT nightly tests.

Please review!

Cheers,

James

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130523/dda44e84/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lazy_linking.patch
Type: application/octet-stream
Size: 16725 bytes
Desc: lazy_linking.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130523/dda44e84/attachment.obj>


More information about the llvm-commits mailing list