[PATCH] D147245: [AMDGPU] Make amdgcn.s.buffer.load a memory-reading intrinsic
Krzysztof Drewniak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 30 10:19:32 PDT 2023
krzysz00 created this revision.
krzysz00 added reviewers: foad, nhaehnle, arsenm.
Herald added subscribers: kosarev, StephenFan, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
krzysz00 requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Change the s.buffer.load to have a memory read effect, correctly
representing that it reads memory and matching the backend's
representation of the intrinsic.
This is forked out of D146761 <https://reviews.llvm.org/D146761>, a larger refactoring of the buffer
intrinsics.
On its own, this commit may have performance implications for users of
s.buffer.load (who are, to my knowledge, mainly Mesa) who may be
relying on that lack of memory effect to hoist loads from constant,
invariant buffers out of loops, for example.
However, when the full buffer refactoring lands, s.buffer.load's new
form will take a pointer-valued argument and thus, the constant-ness
of the buffer will be expressible using annotations as the callsite,
such as "noalias", so this fixup should not have a long-term
performance impact.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D147245
Files:
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.h
llvm/lib/Target/AMDGPU/SIInstrInfo.td
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.s.buffer.load.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.s.buffer.load.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn-s-buffer-load.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.s.buffer.load.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.s.buffer.load.mir
llvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147245.509717.patch
Type: text/x-patch
Size: 345035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230330/1aa282ae/attachment-0001.bin>
More information about the llvm-commits
mailing list