[PATCH] D118153: [CUDA][HIP] Do not treat host var address as constant in device compilation
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 25 08:20:57 PST 2022
yaxunl created this revision.
yaxunl added a reviewer: tra.
yaxunl requested review of this revision.
Currently clang treats host var address as constant in device compilation,
which causes const vars initialized with host var address promoted to
device variables incorrectly and results in undefined symbols.
This patch fixes that.
https://reviews.llvm.org/D118153
Files:
clang/lib/AST/ExprConstant.cpp
clang/test/CodeGenCUDA/const-var.cu
clang/test/SemaCUDA/const-var.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118153.402919.patch
Type: text/x-patch
Size: 4983 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220125/d83e7776/attachment.bin>
More information about the cfe-commits
mailing list