JonChesterfield added a comment.

Added a codegen test for arg passing. It establishes that most arguments are 
left alone, but structs passed by value are handled as an addrspace(4) byref. 
Letting opt -O2 run annotated some argument pointers as being in addrspace(1) 
which I think is wrong.

I have no judgement to pass on the current codegen for this - it might be 
correct, or we might have bugs in opt - but those bugs are exactly those that 
are easier to flush out if we land this patch first. All I want to achieve with 
this patch is a means of tagging a void func(void) with the calling convention.

If we wanted to go further - and turn C++ into a language that is robustly 
usable on the GPU - I think we have a bunch of tasks related to handling 
addrspace annotations to burn through.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125970/new/

https://reviews.llvm.org/D125970

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

Reply via email to