[PATCH] D41861: [LangRef] Clarify Varargs forwarding for musttail calls.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 05:40:51 PST 2018


fhahn updated this revision to Diff 129263.
fhahn added a comment.

Thanks Eli! I've updated the initial paragraph to be explicit about what happens with varargs for tail/musttail. It is slightly more verbose, but I hope it is clearer now. I have left the varargs type rule unchanged for now.


https://reviews.llvm.org/D41861

Files:
  docs/LangRef.rst


Index: docs/LangRef.rst
===================================================================
--- docs/LangRef.rst
+++ docs/LangRef.rst
@@ -9033,9 +9033,11 @@
    #. Arguments with the :ref:`inalloca <attr_inalloca>` attribute are
       forwarded in place.
 
-   Both markers imply that the callee does not access allocas or varargs from
-   the caller. Calls marked ``musttail`` must obey the following additional
-   rules:
+   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:
 
    - The call must immediately precede a :ref:`ret <i_ret>` instruction,
      or a pointer bitcast followed by a ret instruction.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41861.129263.patch
Type: text/x-patch
Size: 904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180110/42304f74/attachment.bin>


More information about the llvm-commits mailing list