[llvm] [LangRef] Revisit attributes semantics after opaque ptr migration (NFC) (PR #146846)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 03:20:17 PDT 2025
https://github.com/antoniofrighetto created https://github.com/llvm/llvm-project/pull/146846
Outdated pointee-type phrasings in ABI attributes have been removed.
>From 87451fbe6b7e51f74ca14ff97435a68195b04a8a Mon Sep 17 00:00:00 2001
From: Antonio Frighetto <me at antoniofrighetto.com>
Date: Thu, 3 Jul 2025 12:06:51 +0200
Subject: [PATCH] [LangRef] Revisit attributes semantics after opaque ptr
migration (NFC)
Outdated pointee-type phrasings in ABI attributes have been removed.
---
llvm/docs/LangRef.rst | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 2a45f4f2dac47..0ac43106bf420 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -1234,8 +1234,7 @@ Currently, only the following parameter attributes are defined:
``byval`` parameters). This is not a valid attribute for return
values.
- The byval type argument indicates the in-memory value type, and
- must be the same as the pointee type of the argument.
+ The byval type argument indicates the in-memory value type.
The byval attribute also supports specifying an alignment with the
align attribute. It indicates the alignment of the stack slot to
@@ -1283,8 +1282,7 @@ Currently, only the following parameter attributes are defined:
any parameter must have a ``"preallocated"`` operand bundle. A ``musttail``
function call cannot have a ``"preallocated"`` operand bundle.
- The preallocated attribute requires a type argument, which must be
- the same as the pointee type of the argument.
+ The preallocated attribute requires a type argument.
The preallocated attribute also supports specifying an alignment with the
align attribute. It indicates the alignment of the stack slot to
@@ -1318,8 +1316,7 @@ Currently, only the following parameter attributes are defined:
must be cleared off with :ref:`llvm.stackrestore
<int_stackrestore>`.
- The inalloca attribute requires a type argument, which must be the
- same as the pointee type of the argument.
+ The inalloca attribute requires a type argument.
See :doc:`InAlloca` for more information on how to use this
attribute.
@@ -1331,8 +1328,7 @@ Currently, only the following parameter attributes are defined:
loads and stores to the structure may be assumed by the callee not
to trap and to be properly aligned.
- The sret type argument specifies the in memory type, which must be
- the same as the pointee type of the argument.
+ The sret type argument specifies the in memory type.
A function that accepts an ``sret`` argument must return ``void``.
A return value may not be ``sret``.
@@ -13178,7 +13174,7 @@ This instruction requires several arguments:
- All ABI-impacting function attributes, such as sret, byval, inreg,
returned, and inalloca, must match.
- The caller and callee prototypes must match. Pointer types of parameters
- or return types may differ in pointee type, but not in address space.
+ or return types do not differ in address space.
On the other hand, if the calling convention is `swifttailcc` or `tailcc`:
More information about the llvm-commits
mailing list