]> granicus.if.org Git - clang/commit
[CUDA][HIP] Skip setting `externally_initialized` for static device variables.
authorMichael Liao <michael.hliao@gmail.com>
Wed, 29 May 2019 17:23:27 +0000 (17:23 +0000)
committerMichael Liao <michael.hliao@gmail.com>
Wed, 29 May 2019 17:23:27 +0000 (17:23 +0000)
commitced275ae4a9488eef8f65dc85d25fa749394e823
treea00527e154ea74dde10844051686a450f3ec448e
parent1f9e79798f820f8528024735289950ac414999b5
[CUDA][HIP] Skip setting `externally_initialized` for static device variables.

Summary:
- By declaring device variables as `static`, we assume they won't be
  addressable from the host side. Thus, no `externally_initialized` is
  required.

Reviewers: yaxunl

Subscribers: cfe-commits

Tags: #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361994 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCUDA/device-var-init.cu