-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[AMDGPU] More accurate handling of alignment around buffer fat pointers #138975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-backend-amdgpu Author: Krzysztof Drewniak (krzysz00)
For some transformations - such as promotion of uniform (and `pointsToConstantMemory()` / `!invariant.load`) `buffer_load` to `s_buffer_load`, each component of the buffer operation - that is, both the address in the base of the buffer *and* the offset have to be aligned appropriately.
Fundamentally, the proposed change is to alter the semantics of Then, lowering in the backend can safely look at the MachineMemOperand's align field to determine which transformations are legal. To accomplish this in the
|
Unfortunately it probably means we need an annotation to assert a known alignment of the resource base register |
make.buffer.rsrc takes (and returns) pointer arguments and so can carry |
For some transformations - such as promotion of uniform (and
pointsToConstantMemory()
/!invariant.load
)buffer_load
tos_buffer_load
, each component of the buffer operation - that is, both the address in the base of the buffer and the offset have to be aligned appropriately.Fundamentally, the proposed change is to alter the semantics of
align
on the pointer arguments ofraw.ptr.buffer.*
to indicate the intersection/minimum of the alignments on the resource base and offset. (Currently,ptr addrspace(7)
lowering uses the alignment of the offset part for this).Then, lowering in the backend can safely look at the MachineMemOperand's align field to determine which transformations are legal.
To accomplish this in the
ptr addrspace(7)
lowering, it will be altered tomake.buffer.rsrc
, argument annotations onptr addrspace(8)
inputs, etc.1
if it can't be known")The text was updated successfully, but these errors were encountered: