[LLVMdev] Plans considering first class structs and multiple return values

Duncan Sands baldrick at free.fr
Mon Jun 9 04:14:13 PDT 2008


Hi,

> Will sretpromotion still be needed? If the frontends would generate functions
> returning a struct directly instead of using an sret argument, sret could
> perhaps be removed alltogether? Though I guess there is an ABI difference
> between using sret and returning a structure directly?

right, there's an ABI difference.  Also you can't return variable sized structs
using MRV support (I don't know if gcc really supports this, but some pieces of
code inside gcc mention functions returning variable sized objects).

Ciao,

Duncan.



More information about the llvm-dev mailing list