arsenm wrote:

> My glossary might be lacking some definitions, but what I really meant by 
> lowering is

The IR is not a direct vehicle for language semantics. This case should 
explicitly not be representable in the target IR, and the frontend needs to 
implement the calling convention in terms of valid IR for the target.

>  What I'm trying to understand if it's really should be done in clang for 
> OpenCL for every target.

This is implementing a stupid OpenCL feature nobody asked for, so clang should 
deal with it. Every other language can happily ignore this. AMDGPU, NVPTX, and 
SPIRV all have the same behavior where kernels / entry points are a separate 
calling convention that cannot be called from device code. This call should be 
unrepresentable in the IR, and forcing it to be such just makes the backends 
worse. We cannot move the calling convention lowering forward without removing 
this artificial usage. 

https://github.com/llvm/llvm-project/pull/115821
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to