[PATCH] D58957: [AMDGPU] Add an experimental buffer fat pointer address space.

Neil Henning via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 08:22:20 PST 2019


sheredom marked 3 inline comments as done.
sheredom added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:297
+  // flat, non-integral buffer fat pointers.
     return "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32"
          "-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128"
----------------
arsenm wrote:
> Shouldn't this add p7:128?
It'd need to be p7:160 - but I'm entirely unsure whether LLVM will drop a lung on a non-power of 2 pointer size.


================
Comment at: lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:257
+      AddrSpace == AMDGPUAS::CONSTANT_ADDRESS_32BIT ||
+      AddrSpace == AMDGPUAS::BUFFER_FAT_POINTER) {
     return 512;
----------------
arsenm wrote:
> This probably shouldn't be included now, at least without a test
It's needed for us to be able to run the middle end optimizations with fat pointers in the module though. I'll work out how to test this.


================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:1050
+      AS == AMDGPUAS::CONSTANT_ADDRESS_32BIT ||
+      AS == AMDGPUAS::BUFFER_FAT_POINTER) {
     // If the offset isn't a multiple of 4, it probably isn't going to be
----------------
arsenm wrote:
> Ditto
TLI calls into this (which is why it is needed). I can work out some pass that queries TLI and do a test though.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58957/new/

https://reviews.llvm.org/D58957





More information about the llvm-commits mailing list