[llvm] [LangRef] Disallow accessing byval arguments from tail-called functions (PR #110093)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 09:17:40 PDT 2024
================
@@ -12658,10 +12658,55 @@ This instruction requires several arguments:
the return value of the callee is returned to 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. Calls marked ``musttail`` must obey the following
- additional rules:
+ Both markers imply that the callee does not access allocas or varargs from
+ the caller. They also imply that the callee does not access the memory
+ pointed to by a byval argument to the caller, unless that pointer is passed
+ to the callee as a byval argument. For example:
----------------
efriedma-quic wrote:
Phrasing here is a little unclear; the "unless that pointer is passed to the callee as a byval argument" part applies to allocas as well.
https://github.com/llvm/llvm-project/pull/110093
More information about the llvm-commits
mailing list