[PATCH] D63850: [AMDGPU] Kernel arg metadata: added support for "__hip_texture" type.
Konstantin Pyzhov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 16:23:12 PDT 2019
kpyzhov created this revision.
kpyzhov added a reviewer: yaxunl.
Herald added subscribers: llvm-commits, hiraditya, t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely, kzhuravl, arsenm.
Herald added a reviewer: a.sidorin.
Herald added a project: LLVM.
Added support for HIP texture kernel arguments to the MetadataStreamerV2::getValueKind() function.
For pointers to "__hip_texture", return ValueKind::Image.
Repository:
rL LLVM
https://reviews.llvm.org/D63850
Files:
llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
@@ -104,6 +104,11 @@
if (TypeQual.find("pipe") != StringRef::npos)
return ValueKind::Pipe;
+ if (isa<PointerType>(Ty) && Ty->getPointerElementType()->isStructTy() &&
+ TypeQual == "__hip_texture") {
+ return ValueKind::Image;
+ }
+
return StringSwitch<ValueKind>(BaseTypeName)
.Case("image1d_t", ValueKind::Image)
.Case("image1d_array_t", ValueKind::Image)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63850.206759.patch
Type: text/x-patch
Size: 650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190626/c7f7d962/attachment.bin>
More information about the llvm-commits
mailing list