nhaustov added a comment.

In http://reviews.llvm.org/D21367#467894, @yaxunl wrote:

> I am wondering what's the difference between this calling convention and 
> spir_kernel.


spir_kernel has only effect and was created only for SPIR target. In theory it 
could perhaps be reused for AMDGPU target, however it seems not very clear to 
me.

In http://reviews.llvm.org/D21367#468057, @yaxunl wrote:

> In http://reviews.llvm.org/D21367#467982, @nhaustov wrote:
>
> > In http://reviews.llvm.org/D21367#467894, @yaxunl wrote:
> >
> > > I am wondering what's the difference between this calling convention and 
> > > spir_kernel.
> >
> >
> > spir_kernel has only effect and was created only for SPIR target. In theory 
> > it could perhaps be reused for AMDGPU target, however it seems not very 
> > clear to me.
>
>
> If the new calling convention is to indicate a function is an OpenCL kernel, 
> then it has exactly the same meaning as spir_kernel. Can we just use it in 
> AMDGPU target?


This looks like a hack to me. Calling conventions in LLVM IR are really target 
specific. spir_kernel really doesn't make sense for anything other than SPIR.

Maybe we can use the fact that calling conventions are separate in AST and in 
LLVM IR. So in AST maybe we can have opencl_kernel and in LLVM it can map to 
spir_kernel for SPIR and amdgpu_kernel for AMDGPU.


http://reviews.llvm.org/D21367



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to