diff options
Diffstat (limited to 'llvm/docs/LangRef.rst')
-rw-r--r-- | llvm/docs/LangRef.rst | 51 |
1 files changed, 23 insertions, 28 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 3aeffc579b4..47afdf94a94 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -1064,6 +1064,8 @@ Currently, only the following parameter attributes are defined: to trap and to be properly aligned. This is not a valid attribute for return values. +.. _attr_align: + ``align <n>`` This indicates that the pointer value may be assumed by the optimizer to have the specified alignment. @@ -10341,9 +10343,9 @@ support all bit widths however. :: declare void @llvm.memcpy.p0i8.p0i8.i32(i8* <dest>, i8* <src>, - i32 <len>, i32 <align>, i1 <isvolatile>) + i32 <len>, i1 <isvolatile>) declare void @llvm.memcpy.p0i8.p0i8.i64(i8* <dest>, i8* <src>, - i64 <len>, i32 <align>, i1 <isvolatile>) + i64 <len>, i1 <isvolatile>) Overview: """"""""" @@ -10352,7 +10354,7 @@ The '``llvm.memcpy.*``' intrinsics copy a block of memory from the source location to the destination location. Note that, unlike the standard libc function, the ``llvm.memcpy.*`` -intrinsics do not return a value, takes extra alignment/isvolatile +intrinsics do not return a value, takes extra isvolatile arguments and the pointers can be in specified address spaces. Arguments: @@ -10360,13 +10362,11 @@ Arguments: The first argument is a pointer to the destination, the second is a pointer to the source. The third argument is an integer argument -specifying the number of bytes to copy, the fourth argument is the -alignment of the source and destination locations, and the fifth is a +specifying the number of bytes to copy, and the fourth is a boolean indicating a volatile access. -If the call to this intrinsic has an alignment value that is not 0 or 1, -then the caller guarantees that both the source and destination pointers -are aligned to that boundary. +The :ref:`align <_attr_align>` parameter attribute can be provided +for the first and second arguments. If the ``isvolatile`` parameter is ``true``, the ``llvm.memcpy`` call is a :ref:`volatile operation <volatile>`. The detailed access behavior is not @@ -10396,9 +10396,9 @@ bit widths however. :: declare void @llvm.memmove.p0i8.p0i8.i32(i8* <dest>, i8* <src>, - i32 <len>, i32 <align>, i1 <isvolatile>) + i32 <len>, i1 <isvolatile>) declare void @llvm.memmove.p0i8.p0i8.i64(i8* <dest>, i8* <src>, - i64 <len>, i32 <align>, i1 <isvolatile>) + i64 <len>, i1 <isvolatile>) Overview: """"""""" @@ -10409,21 +10409,19 @@ source location to the destination location. It is similar to the overlap. Note that, unlike the standard libc function, the ``llvm.memmove.*`` -intrinsics do not return a value, takes extra alignment/isvolatile -arguments and the pointers can be in specified address spaces. +intrinsics do not return a value, takes an extra isvolatile +argument and the pointers can be in specified address spaces. Arguments: """""""""" The first argument is a pointer to the destination, the second is a pointer to the source. The third argument is an integer argument -specifying the number of bytes to copy, the fourth argument is the -alignment of the source and destination locations, and the fifth is a +specifying the number of bytes to copy, and the fourth is a boolean indicating a volatile access. -If the call to this intrinsic has an alignment value that is not 0 or 1, -then the caller guarantees that the source and destination pointers are -aligned to that boundary. +The :ref:`align <_attr_align>` parameter attribute can be provided +for the first and second arguments. If the ``isvolatile`` parameter is ``true``, the ``llvm.memmove`` call is a :ref:`volatile operation <volatile>`. The detailed access behavior is @@ -10453,9 +10451,9 @@ support all bit widths. :: declare void @llvm.memset.p0i8.i32(i8* <dest>, i8 <val>, - i32 <len>, i32 <align>, i1 <isvolatile>) + i32 <len>, i1 <isvolatile>) declare void @llvm.memset.p0i8.i64(i8* <dest>, i8 <val>, - i64 <len>, i32 <align>, i1 <isvolatile>) + i64 <len>, i1 <isvolatile>) Overview: """"""""" @@ -10464,8 +10462,8 @@ The '``llvm.memset.*``' intrinsics fill a block of memory with a particular byte value. Note that, unlike the standard libc function, the ``llvm.memset`` -intrinsic does not return a value and takes extra alignment/volatile -arguments. Also, the destination can be in an arbitrary address space. +intrinsic does not return a value and takes an extra volatile +argument. Also, the destination can be in an arbitrary address space. Arguments: """""""""" @@ -10473,11 +10471,10 @@ Arguments: The first argument is a pointer to the destination to fill, the second is the byte value with which to fill it, the third argument is an integer argument specifying the number of bytes to fill, and the fourth -argument is the known alignment of the destination location. +is a boolean indicating a volatile access. -If the call to this intrinsic has an alignment value that is not 0 or 1, -then the caller guarantees that the destination pointer is aligned to -that boundary. +The :ref:`align <_attr_align>` parameter attribute can be provided +for the first arguments. If the ``isvolatile`` parameter is ``true``, the ``llvm.memset`` call is a :ref:`volatile operation <volatile>`. The detailed access behavior is not @@ -10487,9 +10484,7 @@ Semantics: """""""""" The '``llvm.memset.*``' intrinsics fill "len" bytes of memory starting -at the destination location. If the argument is known to be aligned to -some boundary, this can be specified as the fourth argument, otherwise -it should be set to 0 or 1 (both meaning no alignment). +at the destination location. '``llvm.sqrt.*``' Intrinsic ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |