[llvm] 7603fea - [Documentation] Update parameter and function attribute section in LangRef (#114007)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 2 03:19:25 PDT 2024
Author: Rajat Bajpai
Date: 2024-11-02T11:19:21+01:00
New Revision: 7603feac78376dbee78af56584c298c7b7e00c78
URL: https://github.com/llvm/llvm-project/commit/7603feac78376dbee78af56584c298c7b7e00c78
DIFF: https://github.com/llvm/llvm-project/commit/7603feac78376dbee78af56584c298c7b7e00c78.diff
LOG: [Documentation] Update parameter and function attribute section in LangRef (#114007)
Update the documentation for parameter and function attributes to
include support for target-dependent string attributes.
Added:
Modified:
llvm/docs/LangRef.rst
Removed:
################################################################################
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 177924dca4d178..bbd9667756a498 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -1161,15 +1161,16 @@ parameters of a function. Parameter attributes are considered to be part
of the function, not of the function type, so functions with
diff erent
parameter attributes can have the same function type.
-Parameter attributes are simple keywords that follow the type specified.
-If multiple parameter attributes are needed, they are space separated.
-For example:
+Parameter attributes are either simple keywords or strings that follow the
+specified type. Multiple parameter attributes, when required, are separated by
+spaces. For example:
.. code-block:: llvm
declare i32 @printf(ptr noalias nocapture, ...)
declare i32 @atoi(i8 zeroext)
declare signext i8 @returns_signed_char()
+ define void @baz(i32 "amdgpu-flat-work-group-size"="1,256" %x)
Note that any attributes for the function result (``nonnull``,
``signext``) come before the result type.
@@ -1843,9 +1844,9 @@ a function. Function attributes are considered to be part of the
function, not of the function type, so functions with
diff erent function
attributes can have the same function type.
-Function attributes are simple keywords that follow the type specified.
-If multiple attributes are needed, they are space separated. For
-example:
+Function attributes are simple keywords or strings that follow the specified
+type. Multiple attributes, when required, are separated by spaces.
+For example:
.. code-block:: llvm
@@ -1853,6 +1854,7 @@ example:
define void @f() alwaysinline { ... }
define void @f() alwaysinline optsize { ... }
define void @f() optsize { ... }
+ define void @f() "no-sse" { ... }
``alignstack(<n>)``
This attribute indicates that, when emitting the prologue and
More information about the llvm-commits
mailing list