[PATCH] D148957: [AMDGPU] Add intrinsics for converting global pointers to resources
Krzysztof Drewniak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 13:46:16 PDT 2023
krzysz00 created this revision.
krzysz00 added reviewers: arsenm, foad, nhaehnle, piotr, rampitec.
Herald added subscribers: kosarev, StephenFan, kerbowa, asbirlea, hiraditya, arichardson, 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.
Define the functions @llvm.amdgcn.{flat,global}.as.buffer.rsrc , which
take a 64-bit pointer (in the flat or global address spaces), the
16-bit stride/swizzling constant that replace the high 16 bits of an
address in a buffer resource, the 32-bit extent/number of elements,
and the 32-bit flags (the latter two being the 3rd and 4th wards of
the resource), and combines them into a ptr addrspace(8).
These intrinsics are lowered during the early phases of the backend.
These intrinsics are needed so that alias analysis can correctly infer
that a certain buffer resource points to the same memory as some
global pointer. Previous methods of constructing buffer resources,
which relied on ptrtoint, would not allow for such an inference.
Depends on D148184 <https://reviews.llvm.org/D148184>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148957
Files:
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.h
llvm/test/CodeGen/AMDGPU/GlobalISel/pointer-as-buffer-rsrc.ll
llvm/test/CodeGen/AMDGPU/pointer-as-buffer-rsrc.ll
llvm/test/CodeGen/AMDGPU/ptr-buffer-alias-scheduling.ll
llvm/test/Transforms/LICM/AMDGPU/buffer-rsrc-ptrs.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148957.515904.patch
Type: text/x-patch
Size: 45472 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230421/b36dfa47/attachment.bin>
More information about the llvm-commits
mailing list