<div dir="ltr"><div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On Apr 27, 2017 09:05, "Rafael EspĂ­ndola" <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_3305247657214620729quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_3305247657214620729quoted-text">> This is a small code quality regression. Before we had an internal GV<br>
> that we knew we had to keep. Now we have an external GV.<br>
><br>
> Would it be too hard to get it back?<br>
><br>
> Cheers,<br>
> Rafael<br>
><br>
><br>
> Is there any difference between the two other than the linkage in the object<br>
> file?<br>
<br>
</div>Now that I think of it, this can probably be counted as a bug fix.<br>
<br>
The advantage of making something internal is that it can allow for<br>
optimizations like a custom calling convention.<br>
<br>
But these symbols are being used from assembly, so those optimizations<br>
would be invalid.<br>
<br>
Thanks,<br>
Rafael<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Right, although I'd expect that taking the address in llvm.compiler.used would have already prevented those sorts of optimizations.</div><div dir="auto"><br></div><div dir="auto">The other thing is that we may be using linkage in the midend as an optimization hint (for example, we may use a higher inlining threshold for functions with internal linkage). But I'd expect those kinds of hints to only apply to functions whose address is not taken (i.e. by llvm.compiler.used). So we should be in the same position as before.</div><div dir="auto"><br></div><div dir="auto">Peter</div></div>
</div>