[llvm-commits] [llvm] r102474 - /llvm/trunk/docs/LangRef.html

Chris Lattner sabre at nondot.org
Tue Apr 27 17:13:42 PDT 2010


Author: lattner
Date: Tue Apr 27 19:13:42 2010
New Revision: 102474

URL: http://llvm.org/viewvc/llvm-project?rev=102474&view=rev
Log:
improve the global variable alignment description.
it is not generally valid for targets to overalign
them when an alignment is specified.

Modified:
    llvm/trunk/docs/LangRef.html

Modified: llvm/trunk/docs/LangRef.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=102474&r1=102473&r2=102474&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.html (original)
+++ llvm/trunk/docs/LangRef.html Tue Apr 27 19:13:42 2010
@@ -851,11 +851,14 @@
 <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>





More information about the llvm-commits mailing list