[PATCH] D25428: AMDGPU add support for spilling to a user sgpr pointed buffers
Marek Olšák via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 28 15:07:33 PST 2016
mareko added inline comments.
================
Comment at: lib/Target/AMDGPU/SIFrameLowering.cpp:326
+ .addReg(ScratchRsrcReg, RegState::ImplicitDefine);
+ } else if (MFI->hasSpillUserPtrLoad()) {
+ unsigned Rsrc01 = TRI->getSubReg(ScratchRsrcReg, AMDGPU::sub0_sub1);
----------------
arsenm wrote:
> hasIndirectPrivaetMemoryPointerInput? I assume you are putting other things in this buffer besides just this one pointer, so maybe the name should be whatever you want to call that buffer.
There are no other things in the scratch buffer. Only LLVM uses it. It doesn't matter what it's called from the Mesa's point of view.
================
Comment at: lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:132-135
+ if (F->hasFnAttribute("amdgpu-spill-bufsgpr01"))
+ SpillUserPtr = true;
+ if (F->hasFnAttribute("amdgpu-spill-bufsgpr01-load"))
+ SpillUserPtrLoad = true;
----------------
arsenm wrote:
> I don't really like using the attributes this way naming specific registers. This needs to always be available, so I don't see why you need to explicitly enable this particularly in the indirect case.
I don't understand the comment. Of course it's always available. The driver just chooses one of the methods: 1) scratch relocation; 2) the pointer is in SGPR01; 3) the pointer is at the address pointed to by SGPR01
https://reviews.llvm.org/D25428
More information about the llvm-commits
mailing list