summaryrefslogtreecommitdiffstats
path: root/llvm/docs
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-07-15 01:16:09 +0000
committerReid Kleckner <reid@kleckner.net>2014-07-15 01:16:09 +0000
commit15fe7a530d352aecea65f952e6b321635b4fe2a8 (patch)
treebc57a8dd18688ae152d2f3d1198784096ae07528 /llvm/docs
parent3151463091b6a0ffb40e1a485e9e14f56f527b18 (diff)
downloadbcm5719-llvm-15fe7a530d352aecea65f952e6b321635b4fe2a8.tar.gz
bcm5719-llvm-15fe7a530d352aecea65f952e6b321635b4fe2a8.zip
Document the maximum LLVM IR alignment, which is 1 << 29 or 0.5 GiB
Add verifier checks. We already check these in the assembly parser, but a frontend producing IR in memory wouldn't hit those checks. llvm-svn: 213027
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/LangRef.rst14
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index cc9656a7bfa..a6276418baf 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -582,7 +582,7 @@ to over-align the global if the global has an assigned section. In this
case, the extra alignment could be observable: for example, code could
assume that the globals are densely packed in their section and try to
iterate over them as an array, alignment padding would break this
-iteration.
+iteration. The maximum alignment is ``1 << 29``.
Globals can also have a :ref:`DLL storage class <dllstorageclass>`.
@@ -4925,9 +4925,10 @@ bytes of memory on the runtime stack, returning a pointer of the
appropriate type to the program. If "NumElements" is specified, it is
the number of elements allocated, otherwise "NumElements" is defaulted
to be one. If a constant alignment is specified, the value result of the
-allocation is guaranteed to be aligned to at least that boundary. If not
-specified, or if zero, the target can choose to align the allocation on
-any convenient boundary compatible with the type.
+allocation is guaranteed to be aligned to at least that boundary. The
+alignment may not be greater than ``1 << 29``. If not specified, or if
+zero, the target can choose to align the allocation on any convenient
+boundary compatible with the type.
'``type``' may be any sized type.
@@ -5001,7 +5002,8 @@ or an omitted ``align`` argument means that the operation has the ABI
alignment for the target. It is the responsibility of the code emitter
to ensure that the alignment information is correct. Overestimating the
alignment results in undefined behavior. Underestimating the alignment
-may produce less efficient code. An alignment of 1 is always safe.
+may produce less efficient code. An alignment of 1 is always safe. The
+maximum possible alignment is ``1 << 29``.
The optional ``!nontemporal`` metadata must reference a single
metadata name ``<index>`` corresponding to a metadata node with one
@@ -5087,7 +5089,7 @@ alignment for the target. It is the responsibility of the code emitter
to ensure that the alignment information is correct. Overestimating the
alignment results in undefined behavior. Underestimating the
alignment may produce less efficient code. An alignment of 1 is always
-safe.
+safe. The maximum possible alignment is ``1 << 29``.
The optional ``!nontemporal`` metadata must reference a single metadata
name ``<index>`` corresponding to a metadata node with one ``i32`` entry of
OpenPOWER on IntegriCloud