tra 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::UndefValue:
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: test/
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:
> > >
> > > >
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
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 becaus
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 s
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 shou
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 th
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*
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*
---
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 comment.
11 matches
Mail list logo