<div dir="ltr">On 13 November 2013 14:57, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.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"><div class="im">On 13 November 2013 17:39, Nick Lewycky <<a href="mailto:nlewycky@google.com">nlewycky@google.com</a>> wrote:<br>


> Sorry, I forgot about this thread entirely. I generally don't approve<br>
> non-trivial changes under lib/Target and lib/CodeGen, I'd rather somebody<br>
> else with more assembly/object file/backend knowledge took a look.<br>
><br>
> On 13 November 2013 07:31, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>><br>
> wrote:<br>
>><br>
>> I *think* this is a fine improvement, but please add<br>
>><br>
>> * A comment saying why jmp foo@PLT is not valid or when it would be valid.<br>
>> * A note in tailcallpic2.ll saying that it could be optimized to a<br>
>> direct call (no got, no plt). We don't implement ELF's interposition<br>
>> logic, but then pretend we do during codegen. This patch doesn't need<br>
>> to fix that, but should note that we could do better.<br>
>><br>
>> Nick, do you agree?<br>
><br>
><br>
> I'm a little confused. Either we should implement ELF interposition logic<br>
> (and that means blocking inlining of interposable functions) or we shouldn't<br>
<br>
</div>I agree.<br>
<div class="im"><br>
> -- and I think we've decided previously that we shouldn't. If the issue is<br>
> just that it's a missed optimization then that's fine.<br>
<br>
</div>Yes, the patch in the case of tailcallpic2.ll takes us from one missed<br>
optimization (using GOT when we don't need) to another (using PLT when<br>
we don't need).<br></blockquote><div><br></div><div>Sounds good to me!</div><div><br></div></div><br></div></div>