]> granicus.if.org Git - clang/commit
[HIP] Support attribute hip_pinned_shadow
authorYaxun Liu <Yaxun.Liu@amd.com>
Wed, 26 Jun 2019 03:47:37 +0000 (03:47 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Wed, 26 Jun 2019 03:47:37 +0000 (03:47 +0000)
commit8d068d6ad41e3e39a0ce34148f968eadd48b53bb
tree050f9ce334d2cb10df7ef9879e897050351feab5
parent07c5962dcfcb375dee6af89702ceae429ea2a0ac
[HIP] Support attribute hip_pinned_shadow

This patch introduces support of hip_pinned_shadow variable for HIP.

A hip_pinned_shadow variable is a global variable with attribute hip_pinned_shadow.
It has external linkage on device side and has no initializer. It has internal
linkage on host side and has initializer or static constructor. It can be accessed
in both device code and host code.

This allows HIP runtime to implement support of HIP texture reference.

Differential Revision: https://reviews.llvm.org/D62738

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364381 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/TargetInfo.cpp
lib/Driver/ToolChains/HIP.cpp
lib/Sema/SemaDeclAttr.cpp
test/AST/ast-dump-hip-pinned-shadow.cu [new file with mode: 0644]
test/CodeGenCUDA/hip-pinned-shadow.cu [new file with mode: 0644]
test/Driver/hip-toolchain-no-rdc.hip
test/Driver/hip-toolchain-rdc.hip
test/Misc/pragma-attribute-supported-attributes-list.test
test/SemaCUDA/hip-pinned-shadow.cu [new file with mode: 0644]