[PATCH] D107718: [cuda] Mark builtin texture/surface reference variable as 'externally_initialized'.
Michael Liao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 9 09:05:03 PDT 2021
hliao added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4441
if (Linkage != llvm::GlobalValue::InternalLinkage &&
- (D->hasAttr<CUDADeviceAttr>() || D->hasAttr<CUDAConstantAttr>()))
+ (D->hasAttr<CUDADeviceAttr>() || D->hasAttr<CUDAConstantAttr>() ||
+ D->getType()->isCUDADeviceBuiltinSurfaceType() ||
----------------
yaxunl wrote:
> we need also do this with variables with HIPManagedAttr and add a test for that
those managed var seems already being marked 'externally_initalized' in lib/CodeGen/CGCUDANV.cpp. Do you have missing places to mark them?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107718/new/
https://reviews.llvm.org/D107718
More information about the cfe-commits
mailing list