[PATCH] D62738: [HIP] Support texture type
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 31 08:36:57 PDT 2019
yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added a reviewer: a.sidorin.
This patch handles `__attribute__((device_builtin_vector_type))` for HIP.
If a class or struct type has this attribute, any variables with this type will
be emitted as global symbol in device code with undef initializer, and
registered by `__hipRegisterVar` with shadow variable in host code.
This allows HIP runtime to implement support of HIP texture type.
For CUDA, there is no change for codegen since it depends on implementation.
https://reviews.llvm.org/D62738
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
lib/AST/TypePrinter.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/TargetInfo.cpp
lib/Sema/SemaDeclAttr.cpp
test/CodeGenCUDA/texture.cu
test/SemaCUDA/attr-declspec.cu
test/SemaCUDA/attributes-on-non-cuda.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62738.202440.patch
Type: text/x-patch
Size: 8827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190531/9487cbf0/attachment.bin>
More information about the cfe-commits
mailing list