Skip to content

Commit 7603fea

Browse files
authored
[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.
1 parent 6365ee8 commit 7603fea

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

llvm/docs/LangRef.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,15 +1161,16 @@ parameters of a function. Parameter attributes are considered to be part
11611161
of the function, not of the function type, so functions with different
11621162
parameter attributes can have the same function type.
11631163

1164-
Parameter attributes are simple keywords that follow the type specified.
1165-
If multiple parameter attributes are needed, they are space separated.
1166-
For example:
1164+
Parameter attributes are either simple keywords or strings that follow the
1165+
specified type. Multiple parameter attributes, when required, are separated by
1166+
spaces. For example:
11671167

11681168
.. code-block:: llvm
11691169

11701170
declare i32 @printf(ptr noalias nocapture, ...)
11711171
declare i32 @atoi(i8 zeroext)
11721172
declare signext i8 @returns_signed_char()
1173+
define void @baz(i32 "amdgpu-flat-work-group-size"="1,256" %x)
11731174

11741175
Note that any attributes for the function result (``nonnull``,
11751176
``signext``) come before the result type.
@@ -1843,16 +1844,17 @@ a function. Function attributes are considered to be part of the
18431844
function, not of the function type, so functions with different function
18441845
attributes can have the same function type.
18451846

1846-
Function attributes are simple keywords that follow the type specified.
1847-
If multiple attributes are needed, they are space separated. For
1848-
example:
1847+
Function attributes are simple keywords or strings that follow the specified
1848+
type. Multiple attributes, when required, are separated by spaces.
1849+
For example:
18491850

18501851
.. code-block:: llvm
18511852

18521853
define void @f() noinline { ... }
18531854
define void @f() alwaysinline { ... }
18541855
define void @f() alwaysinline optsize { ... }
18551856
define void @f() optsize { ... }
1857+
define void @f() "no-sse" { ... }
18561858

18571859
``alignstack(<n>)``
18581860
This attribute indicates that, when emitting the prologue and

0 commit comments

Comments
 (0)