summaryrefslogtreecommitdiffstats
path: root/llvm/docs/LangRef.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-28 00:13:42 +0000
committerChris Lattner <sabre@nondot.org>2010-04-28 00:13:42 +0000
commit78e00bcb7647913155e8dcabe75ebf50e5be2943 (patch)
tree51eb1844841ce7265a2cb4fdd50d918c02d232ea /llvm/docs/LangRef.html
parentd06fb865eba3f85d80c38172b00c6895c89c9b3f (diff)
downloadbcm5719-llvm-78e00bcb7647913155e8dcabe75ebf50e5be2943.tar.gz
bcm5719-llvm-78e00bcb7647913155e8dcabe75ebf50e5be2943.zip
improve the global variable alignment description.
it is not generally valid for targets to overalign them when an alignment is specified. llvm-svn: 102474
Diffstat (limited to 'llvm/docs/LangRef.html')
-rw-r--r--llvm/docs/LangRef.html13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html
index 414c7a01a3c..05637ab3306 100644
--- a/llvm/docs/LangRef.html
+++ b/llvm/docs/LangRef.html
@@ -851,11 +851,14 @@ define i32 @main() { <i>; i32()* </i>
<p>LLVM allows an explicit section to be specified for globals. If the target
supports it, it will emit globals to the section specified.</p>
-<p>An explicit alignment may be specified for a global. If not present, or if
- the alignment is set to zero, the alignment of the global is set by the
- target to whatever it feels convenient. If an explicit alignment is
- specified, the global is forced to have at least that much alignment. All
- alignments must be a power of 2.</p>
+<p>An explicit alignment may be specified for a global, which must be a power
+ of 2. If not present, or if the alignment is set to zero, the alignment of
+ the global is set by the target to whatever it feels convenient. If an
+ explicit alignment is specified, the global is forced to have exactly that
+ alignment. Targets are not allowed to over-align the global in cases where
+ it is observable: for example, overaligning a global is observable if it has
+ an assigned section and higher alignment could cause holes between
+ consequtive globals.</p>
<p>For example, the following defines a global in a numbered address space with
an initializer, section, and alignment:</p>
OpenPOWER on IntegriCloud