Return the address space ID for a target's flat address space.

Synopsis

Declared in <llvm/Analysis/TargetTransformInfo.h>

unsigned int
getFlatAddressSpace() const;

Description

Note this is not necessarily the same as addrspace(0), which LLVM sometimes refers to as the generic address space. The flat address space is a generic address space that can be used access multiple segments of memory with different address spaces. Access of a memory location through a pointer with this address space is expected to be legal but slower compared to the same memory location accessed through a pointer with a different address space.

This is for targets with different pointer representations which can be converted with the addrspacecast instruction. If a pointer is converted to this address space, optimizations should attempt to replace the access with the source address space.

Return Value

~0u if the target does not have such a flat address space to optimize away.

Created with MrDocs