[PATCH] GlobalOpt: Apply fastcc to internal x86_thiscallcc functions

Reid Kleckner rnk at google.com
Wed Feb 26 13:04:48 PST 2014


On Mon, Feb 24, 2014 at 6:46 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> > I conceptually agree, but I think that's an issue beyond this
> optimization.
> > I think this patch LGTM, Rafael?
>
> Almost. Please include a corresponding change to the LangRef. Just
> state which calling conventions can or cannot cannot be changed when
> the target function is internal or private.
>

I don't think we should give an explicit list based on what GlobalOpt does
today, because it will change.

Ultimately, if users want to preserve the calling convention of internal
functions, they should use llvm.used / compiler_used.  I just don't want to
break them right now.

If we update LangRef, I would say that optimizers are allowed to change
calling conventions of functions if it can simultaneously update all
possible callers.  But, even that feels too specific. It's generally
implied that LLVM's optimizers can do anything that the user can't
observer, and this feels pretty close to that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140226/63008e06/attachment.html>


More information about the llvm-commits mailing list