@@ -3050,6 +3050,25 @@ as follows:
30503050 address space 0, this property only affects the default value to be used
30513051 when creating globals without additional contextual information (e.g. in
30523052 LLVM passes).
3053+ ``T<address space>``
3054+ Specifies the 'flat' address space for a target. Some targets may have an
3055+ address space that allows access to multiple memory segments, each with
3056+ distinct address spaces. Accessing memory through a pointer in this address
3057+ space is valid but may be slower than using a pointer with a more specific
3058+ address space. When a pointer is converted to this address space,
3059+ optimizations can attempt to replace the access with one using the original
3060+ address space. This is the 'flat' address space. It is intended for targets
3061+ with varying pointer representations, which can be converted using the
3062+ addrspacecast instruction. It is important to note that the flat address
3063+ space is not always equivalent to address space 0, which LLVM commonly
3064+ refers to as the generic address space. For instance, in SPIR and SPIR-V,
3065+ address space 4 is designated as the flat address space. Additionally, the
3066+ flat address space must correspond to an existing address space of the
3067+ target. Specifying an address space as 'flat' address space does not change
3068+ any inherent characteristics of the original address spaces, nor does it
3069+ guarantee any additional properties. If this specification is absent, it
3070+ indicates that the target does not support a flat address space for
3071+ optimization.
30533072
30543073.. _alloca_addrspace:
30553074
0 commit comments