<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 5 February 2014 10:21, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">> What about things like the WebKit JS CC?  I assume the reason they do it<br>


> that way is so that they can get GC roots in memory on the stack, and<br>
> changing something like this to fastcc would break their GC.  The same might<br>
> apply to the GHC convention, although I doubt it.  Changing the CC feels a<br>
> lot like eliminating frame pointers, in that could mess with unwinders.<br>
><br>
> I agree that LLVM IR semantics *allow* us to do this, but I didn't feel the<br>
> need to rock this particular boat.<br>
<br>
</div>We should at least make that explicit in the language reference. In<br>
the long run llvm.used and llvm.compiler_used should just be part of<br>
the linkage, making them easier to use. We could then, for example,<br>
require in the verifier that the WebKit JS CC is only used in<br>
functions with a linkage that imply an invisible external use.<br></blockquote><div><br></div><div>I conceptually agree, but I think that's an issue beyond this optimization. I think this patch LGTM, Rafael?</div><div>

<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><br>
> If you just want to flip the naming around here to something like<br>
> isProfitableToMakeFastCC() then that works for me.<br></div></blockquote><div><br></div><div><div class="gmail_extra">isProfitableToMakeFastCC sounds nice. What really matters is that it needs to be a whitelist.</div>

</div><div><br></div></div></div></div>