[PATCH] musttail: Forward regparms of variadic functions on x86_64

Reid Kleckner rnk at google.com
Mon Aug 25 20:34:58 PDT 2014

Hi majnemer,

If a variadic function body contains a musttail call, then we copy all
of the remaining register parameters into virtual registers in the
function prologue. We track the virtual registers through the function
body, and add them as additional registers to pass to the call. Because
this is all done in virtual registers, the register allocator usually
gives us good code. If the function does a call, however, it will have
to spill and reload all argument registers (ew).

Forwarding regparms on x86_32 is not implemented because most compilers
don't support varargs in 32-bit with regparms.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5060.12933.patch
Type: text/x-patch
Size: 20184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140826/3c4b8e07/attachment.bin>

More information about the llvm-commits mailing list