[PATCH] D31284: [AMDGPU] Get address space mapping by target triple
Tony Tye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 11:46:27 PDT 2017
t-tye added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPU.h:181-209
+ const static unsigned GLOBAL_ADDRESS = 1; ///< Address space for global memory (RAT0, VTX0).
+ const static unsigned LOCAL_ADDRESS = 3; ///< Address space for local memory.
+ const static unsigned PARAM_D_ADDRESS = 6; ///< Address space for direct addressible parameter memory (CONST0)
+ const static unsigned PARAM_I_ADDRESS = 7; ///< Address space for indirect addressible parameter memory (VTX1)
// Do not re-order the CONSTANT_BUFFER_* enums. Several places depend on this
// order to be able to dynamically index a constant buffer, for example:
----------------
Since all these are still constants, and the plan is to revert back to having an enumeration for AddressSpaces, would it be better to leave these as an anonymous enum enumerators and avoid the need for changing this text, or defining the large number of static variables needed?
https://reviews.llvm.org/D31284
More information about the llvm-commits
mailing list