From 284d992777d6364962037eb71082547507275765 Mon Sep 17 00:00:00 2001
From: Christopher Lamb
A global variable may be declared to reside in a target-specifc numbered +address space. For targets that support them, address spaces may affect how +optimizations are performed and/or what target instructions are used to access +the variable. The default address space is zero.
+LLVM allows an explicit section to be specified for globals. If the target supports it, it will emit globals to the section specified.
@@ -677,12 +682,12 @@ 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. -For example, the following defines a global with an initializer, section, - and alignment:
+For example, the following defines a global in a numbered address space with +an initializer, section, and alignment:
-@G = constant float 1.0, section "foo", align 4 +@G = constant float 1.0 addrspace(5), section "foo", align 4
As in many languages, the pointer type represents a pointer or -reference to another object, which must live in memory.
+reference to another object, which must live in memory. Pointer types may have +an optional address space attribute defining the target-specific numbered +address space where the pointed-to object resides. The default address space is +zero.<type> *