<div dir="ltr">On 28 May 2013 10:26, James Molloy <span dir="ltr"><<a href="mailto:James.Molloy@arm.com" target="_blank">James.Molloy@arm.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>
</blockquote><div><br></div><div style>This is a good argument. ;)</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>
</blockquote><div><br></div><div style>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.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can change this to pass references to everything it needs in the constructor however, if you feel that's a better solution!<br>
</blockquote><div><br></div><div style>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... ;)</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><span style="color:rgb(34,34,34)">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 :()</span></div>
</blockquote><div></div></div><br></div><div class="gmail_extra" style>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. ;)</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>Nevertheless, thanks for the patch, 45% on large modules is a great improvement!</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>
cheers,</div><div class="gmail_extra" style>--renato</div></div>