[PATCH] D31284: [WIP] [AMDGPU] Get address space mapping by target triple
Yaxun Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 07:19:34 PDT 2017
yaxunl created this revision.
Herald added subscribers: tpr, dstuttard, nhaehnle, wdng, kzhuravl.
This is preview of the work to get address space mapping by target triple.
As we introduced target triple environment amdgiz and amdgizcl, the address space values are no longer enums. We have to decide the value by target triple.
The basic idea is to use struct AMDGPUAS to represent address space values. For address space values which are not depend on target triple, use static const members, so that they don't occupy extra memory space and is equivalent to a compile time constant.
Since the struct is lightweight and cheap, it can be created on the fly at the point of usage. Or it can be added as member to a pass and created at the beginning of the run* function.
https://reviews.llvm.org/D31284
Files:
lib/Target/AMDGPU/AMDGPU.h
lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp
lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31284.92791.patch
Type: text/x-patch
Size: 9651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170323/7a68dedb/attachment.bin>
More information about the llvm-commits
mailing list