AaronBallman wrote:

> > Do we need yet another calling convention or is there a way we can start to 
> > combine some of these for all the offloading languages? It seems we keep 
> > re-implementing the same concepts multiple times for each language and it 
> > would be nice to share as much of the frontend logic as possible rather 
> > than keep doing this dance of adding another case to every switch in the 
> > compiler. :-D
> 
> Do you have an idea? Maybe we could have a `calling_convention` attribute 
> that takes in a string that specifies the calling convention?

I was thinking that orthogonal calling conventions could be combined so that we 
need fewer of them. e.g., if spir_kernel cannot be mixed with nvptx_kernel in 
the same TU, then there's no need for two distinct internal representations for 
the attributes, just two distinct spellings that are based on the target.

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

Reply via email to