[PATCH] Improve linker performance (v2)

James Molloy James.Molloy at arm.com
Tue May 28 08:03:49 PDT 2013


Hi Renato,

Attached is a patch which addresses all your concerns.

Am I OK to commit?

James

From: Renato Golin [mailto:renato.golin at linaro.org]
Sent: 28 May 2013 10:36
To: James Molloy
Cc: llvm-commits; Renato Golin
Subject: Re: [PATCH] Improve linker performance (v2)

On 28 May 2013 10:26, James Molloy <James.Molloy at arm.com<mailto:James.Molloy at arm.com>> wrote:
I understand that there's only one use of this functionality so far, but considered that (a) demand-value-generation may be useful to other (potentially out of tree) consumers, because the RemapInstruction interface is used widely and (b) RemapInstruction is sufficiently complex that rewriting it just for the linker would be worse practice.

This is a good argument. ;)


I agree. Actually ValueMaterializerTy is what in C++11 would be defined as a final class. It extends ValueMaterializer and is the last implementation in the hierarchy. It is a concrete class specific to the linker, and requires access to multiple pieces of the linker state, which is why I saw fit to grant it friend status.

Yes, the only times where I let myself use friend, even knowing that it wasn't the more elegant solution, was when working around issues in either the compiler (newer GCC being more strict) or the language.


I can change this to pass references to everything it needs in the constructor however, if you feel that's a better solution!

I trust you on that. Feel free to do it locally and revert to use friend if not helpful. It won't be the first use of friend in LLVM... ;)


This is true, apologies. I'll attempt to distill down a regression test (it took quite a bit of distilling to just get it to a state where I could understand what was going on :()

It took me a while to understand your patch, as well... Not that it's complex per se, but what's involved around (and outside) the patch is not linear. ;)

Nevertheless, thanks for the patch, 45% on large modules is a great improvement!

cheers,
--renato

-- 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/20130528/a18f8c0a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lazy_linking.patch
Type: application/octet-stream
Size: 17607 bytes
Desc: lazy_linking.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130528/a18f8c0a/attachment.obj>


More information about the llvm-commits mailing list