llvm.org GIT mirror llvm / d868a04
Clarify how musttail can be used to create forwarding thunks git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361590 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 5 months ago
1 changed file(s) with 7 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
1000510005 recursive cycle in the call graph.
1000610006 #. Arguments with the :ref:`inalloca ` attribute are
1000710007 forwarded in place.
10008 #. If the musttail call appears in a function with the ``"thunk"`` attribute
10009 and the caller and callee both have varargs, than any unprototyped
10010 arguments in register or memory are forwarded to the callee. Similarly,
10011 the return value of the callee is returned the the caller's caller, even
10012 if a void return type is in use.
1000810013
1000910014 Both markers imply that the callee does not access allocas from the caller.
1001010015 The ``tail`` marker additionally implies that the callee does not access
10011 varargs from the caller, while ``musttail`` implies that varargs from the
10012 caller are passed to the callee. Calls marked ``musttail`` must obey the
10013 following additional rules:
10016 varargs from the caller. Calls marked ``musttail`` must obey the following
10017 additional rules:
1001410018
1001510019 - The call must immediately precede a :ref:`ret ` instruction,
1001610020 or a pointer bitcast followed by a ret instruction.