[llvm-commits] sret-demotion for large struct returns working on x86!

Kenneth Uildriks kennethuil at gmail.com
Sun Nov 8 18:37:28 PST 2009


If a struct can't be returned in registers, have SelectionDAGBuild
insert a hidden sret parameter and have return instructions store the
return value through the hidden pointer.  Formal arguments, return
instructions, and calls are all updated as needed.

Only x86 has the code to actually check whether sret-demotion is
needed.... other platforms invariably report that they can return
values in registers, even when they can't.

Coming soon: test cases, fixes for other platforms.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sret-demote.patch
Type: text/x-patch
Size: 17031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091108/8627c1c8/attachment.bin>


More information about the llvm-commits mailing list