tra added a comment.
In https://reviews.llvm.org/D44747#1055894, @yaxunl wrote:
> Let's revert it for now. I will create a review after fixing it and commit it
> again with the fix.
>
> Thanks.
>
> Sam
reverted in r329099.
Repository:
rL LLVM
https://reviews.llvm.org/D44747
___
l.com; Arsenault,
Matthew
Cc: jle...@google.com; llvm-comm...@lists.llvm.org; t...@google.com;
Zhuravlyov, Konstantin ; wei.di...@amd.com;
Stuttard, David ; tpr.l...@botech.co.uk; Tye, Tony
; cfe-commits@lists.llvm.org
Subject: [PATCH] D44747: Set calling convention for CUDA kernel
tra added a co
tra added a comment.
In https://reviews.llvm.org/D44747#1055877, @yaxunl wrote:
> I will try fixing that.
>
> The CUDA kernel calling convention should be dropped in all DRE's since it is
> invisible to the user.
>
> Sam
Apparently it's not always the case.
Here's a bit more elaborate example
rjmcc...@gmail.com; Arsenault,
Matthew
Cc: llvm-comm...@lists.llvm.org; t...@google.com; Zhuravlyov, Konstantin
; wei.di...@amd.com; Stuttard, David
; tpr.l...@botech.co.uk; Tye, Tony ;
cfe-commits@lists.llvm.org; jle...@google.com
Subject: [PATCH] D44747: Set calling convention for CUDA kernel
tra added inline comments.
Comment at: lib/Sema/SemaType.cpp:3319-3330
+ // Attribute AT_CUDAGlobal affects the calling convention for AMDGPU targets.
+ // This is the simplest place to infer calling convention for CUDA kernels.
+ if (S.getLangOpts().CUDA && S.getLangOpts().CU
tra added inline comments.
Comment at: lib/Sema/SemaType.cpp:3319-3330
+ // Attribute AT_CUDAGlobal affects the calling convention for AMDGPU targets.
+ // This is the simplest place to infer calling convention for CUDA kernels.
+ if (S.getLangOpts().CUDA && S.getLangOpts().CU
This revision was automatically updated to reflect the committed changes.
Closed by commit rL328795: Set calling convention for CUDA kernel (authored by
yaxunl, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D44747?vs=140131&id=140256#
This revision was automatically updated to reflect the committed changes.
Closed by commit rC328795: Set calling convention for CUDA kernel (authored by
yaxunl, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D44747
Files:
include/clang/Basic/Specifiers.h
lib/AST/ItaniumMangl
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
LGTM.
https://reviews.llvm.org/D44747
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/
yaxunl updated this revision to Diff 140131.
yaxunl marked 2 inline comments as done.
yaxunl added a comment.
Use getAs instead of dyn_cast as John suggested.
https://reviews.llvm.org/D44747
Files:
include/clang/Basic/Specifiers.h
lib/AST/ItaniumMangle.cpp
lib/AST/Type.cpp
lib/AST/TypeP
yaxunl added a comment.
Matt, are you OK with the change from amdgcn backend point of view? Thanks.
Comment at: lib/Sema/SemaExpr.cpp:1669
+}
+ }
+
rjmccall wrote:
> You should use `getAs` here (no `const` necessary). It's
> possible to declare a functio
rjmccall added a comment.
LGTM.
If `__global__` is supported in C++ structures, you might also need to make
sure that member function constants (`&A::kernel_function`) drop the CC. And
it might be a good idea to make sure that `decltype(kernel_function)` doesn't
have a problem with it, either
yaxunl updated this revision to Diff 140076.
yaxunl marked 4 inline comments as done.
yaxunl added a comment.
Revised by John's comments. Drop CUDA kernel calling convention in DRE.
https://reviews.llvm.org/D44747
Files:
include/clang/Basic/Specifiers.h
lib/AST/ItaniumMangle.cpp
lib/AST/T
rjmccall added inline comments.
Comment at: lib/Sema/SemaOverload.cpp:1492
+ Changed = true;
+}
+
yaxunl wrote:
> rjmccall wrote:
> > It's cheaper not to check the CUDA language mode here; pulling the CC out
> > of the FPT is easy.
> >
> > Why is this
yaxunl marked 3 inline comments as done.
yaxunl added inline comments.
Comment at: lib/Sema/SemaOverload.cpp:1492
+ Changed = true;
+}
+
rjmccall wrote:
> It's cheaper not to check the CUDA language mode here; pulling the CC out of
> the FPT is easy.
>
rjmccall added inline comments.
Comment at: lib/AST/Type.cpp:2762
+ case CC_CUDAKernel:
+return "cuda_kernel";
}
For consistency with the rest of this switch, please put the return on the same
line as its case.
Comment at: lib/AST/Type
yaxunl updated this revision to Diff 139625.
yaxunl retitled this revision from "[AMDGPU] Set calling convention for CUDA
kernel" to "Set calling convention for CUDA kernel".
yaxunl edited the summary of this revision.
yaxunl added a comment.
Revised by John's comments. Introduce CC_CUDAKernel ca
17 matches
Mail list logo