[PATCH] D67855: [X86] Add new calling convention that guarantees tail call optimization

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 09:20:44 PDT 2019


paquette added inline comments.


================
Comment at: llvm/docs/LangRef.rst:439-448
+"``tailcc``" - Tail callable calling convention
+    This calling convention attempts to make calls as fast as possible
+    (e.g. by passing things in registers), while also ensuring it is always
+    possible to perform tail call optimization on calls that are in tail
+    position. This calling convention allows the target to use whatever tricks
+    it wants to produce fast code for the target, without having to conform to
+    an externally specified ABI (Application Binary Interface). `Tail calls can
----------------
dwightguth wrote:
> paquette wrote:
> > Instead of copying the documentation from `fastcc`, it might be better to say this is equivalent (other than the tail call part)
> It's not totally equivalent though... it's only equivalent to fastcc if you pass -tailcallopt. I agree with what you're proposing at a high level, but I'm not sure how to word it. Do you have a suggestion?
Maybe something like this?

"This calling convention ensures that calls in tail position will always be tail call optimized. This calling convention is equivalent to `fastcc` with an additional guarantee that tail calls will be produced whenever possible. Tail calls can only be optimized when this..."


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67855/new/

https://reviews.llvm.org/D67855





More information about the llvm-commits mailing list