This revision was automatically updated to reflect the committed changes.
Closed by commit rL328994: [CUDA] Let device-side shared variables be
initialized with undef (authored by yaxunl, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/
rjmccall accepted this revision.
rjmccall added a comment.
LGTM, thanks.
https://reviews.llvm.org/D44985
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl updated this revision to Diff 140640.
yaxunl added a comment.
Only check attribute.
https://reviews.llvm.org/D44985
Files:
lib/CodeGen/CGDecl.cpp
test/CodeGenCUDA/address-spaces.cu
test/CodeGenCUDA/device-var-init.cu
Index: test/CodeGenCUDA/device-var-init.cu
=
yaxunl added inline comments.
Comment at: lib/CodeGen/CGDecl.cpp:235-240
+ if (Ty.getAddressSpace() != LangAS::opencl_local &&
+ !(getLangOpts().CUDA && getLangOpts().CUDAIsDevice &&
+D.hasAttr()))
Init = EmitNullConstant(Ty);
else
Init = llvm::UndefVal
rjmccall added inline comments.
Comment at: lib/CodeGen/CGDecl.cpp:235-240
+ if (Ty.getAddressSpace() != LangAS::opencl_local &&
+ !(getLangOpts().CUDA && getLangOpts().CUDAIsDevice &&
+D.hasAttr()))
Init = EmitNullConstant(Ty);
else
Init = llvm::UndefV
tra added a comment.
Still LGTM.
https://reviews.llvm.org/D44985
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl updated this revision to Diff 140329.
yaxunl retitled this revision from "Remove initializer for CUDA shared
varirable" to "[CUDA] Let device-side shared variables be initialized with
undef".
yaxunl edited the summary of this revision.
yaxunl added a comment.
Revised by Artem's comment. I