[llvm] r361590 - Clarify how musttail can be used to create forwarding thunks
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu May 23 18:45:48 PDT 2019
Author: rnk
Date: Thu May 23 18:45:47 2019
New Revision: 361590
URL: http://llvm.org/viewvc/llvm-project?rev=361590&view=rev
Log:
Clarify how musttail can be used to create forwarding thunks
Modified:
llvm/trunk/docs/LangRef.rst
Modified: llvm/trunk/docs/LangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=361590&r1=361589&r2=361590&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.rst (original)
+++ llvm/trunk/docs/LangRef.rst Thu May 23 18:45:47 2019
@@ -10006,12 +10006,16 @@ This instruction requires several argume
recursive cycle in the call graph.
#. Arguments with the :ref:`inalloca <attr_inalloca>` attribute are
forwarded in place.
+ #. If the musttail call appears in a function with the ``"thunk"`` attribute
+ and the caller and callee both have varargs, than any unprototyped
+ arguments in register or memory are forwarded to the callee. Similarly,
+ the return value of the callee is returned the the caller's caller, even
+ if a void return type is in use.
Both markers imply that the callee does not access allocas from the caller.
The ``tail`` marker additionally implies that the callee does not access
- varargs from the caller, while ``musttail`` implies that varargs from the
- caller are passed to the callee. Calls marked ``musttail`` must obey the
- following additional rules:
+ varargs from the caller. Calls marked ``musttail`` must obey the following
+ additional rules:
- The call must immediately precede a :ref:`ret <i_ret>` instruction,
or a pointer bitcast followed by a ret instruction.
More information about the llvm-commits
mailing list