[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 140310. yaxunl added a comment. Revised by John's comments. Also simplified the test by Artem's comments. https://reviews.llvm.org/D44985 Files: lib/CodeGen/CGDecl.cpp test/CodeGenCUDA/address-spaces.cu test/CodeGenCUDA/device-var-init.cu Index:

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44985#1051840, @yaxunl wrote: > In https://reviews.llvm.org/D44985#1050876, @rjmccall wrote: > > > In https://reviews.llvm.org/D44985#1050674, @yaxunl wrote: > > > > > In https://reviews.llvm.org/D44985#1050670, @rjmccall wrote: > > > > > >

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D44985#1050876, @rjmccall wrote: > In https://reviews.llvm.org/D44985#1050674, @yaxunl wrote: > > > In https://reviews.llvm.org/D44985#1050670, @rjmccall wrote: > > > > > What exactly are you trying to express here? Are you just trying to make

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44985#1050674, @yaxunl wrote: > In https://reviews.llvm.org/D44985#1050670, @rjmccall wrote: > > > What exactly are you trying to express here? Are you just trying to make > > these external declarations when compiling for the device

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D44985#1050670, @rjmccall wrote: > What exactly are you trying to express here? Are you just trying to make > these external declarations when compiling for the device because > `__shared__` variables are actually defined on the host? That

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In https://reviews.llvm.org/D44985#1050670, @rjmccall wrote: > What exactly are you trying to express here? Are you just trying to make > these external declarations when compiling for the device because > `__shared__` variables are actually defined on the host? That

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. What exactly are you trying to express here? Are you just trying to make these external declarations when compiling for the device because `__shared__` variables are actually defined on the host? That should be handled by the frontend by setting up the AST so that

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: test/CodeGenCUDA/device-var-init.cu:121 __device__ void df() { + // AMDGCN: %[[ec:.*]] = addrspacecast %struct.EC addrspace(5)* %ec to %struct.EC* + // AMDGCN: %[[ed:.*]] = addrspacecast %struct.ED addrspace(5)* %ed to %struct.ED*

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: test/CodeGenCUDA/device-var-init.cu:121 __device__ void df() { + // AMDGCN: %[[ec:.*]] = addrspacecast %struct.EC addrspace(5)* %ec to %struct.EC* + // AMDGCN: %[[ed:.*]] = addrspacecast %struct.ED addrspace(5)* %ed to %struct.ED*

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 140110. yaxunl retitled this revision from "Disable zeroinitializer for CUDA shared varirable for amdgcn target" to "Remove initializer for CUDA shared varirable". yaxunl edited the summary of this revision. yaxunl added a reviewer: tra. yaxunl added a