[WebAssembly] Switch varags calling convention to use a register
authorDerek Schuff <dschuff@google.com>
Wed, 10 Feb 2016 19:51:04 +0000 (19:51 +0000)
committerDerek Schuff <dschuff@google.com>
Wed, 10 Feb 2016 19:51:04 +0000 (19:51 +0000)
commit27501e2065f70eb3a1b6bd021e2459102e1f5832
treea1ee9405c83a43b0b87001a980b39012174ccc2a
parent5cba8d5fb532c58e40d913fb1cf469c1136c217f
[WebAssembly] Switch varags calling convention to use a register

Instead of passing varargs directly on the user stack, allocate a buffer in
the caller's stack frame and pass a pointer to it. This simplifies the C
ABI (e.g. non-C callers of C functions do not need to use C's user stack if
they have their own mechanism) and allows further optimizations in the future
(e.g. fewer functions may need to use the stack).

Differential Revision: http://reviews.llvm.org/D17048

llvm-svn: 260421
llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
llvm/lib/Target/WebAssembly/known_gcc_test_failures.txt
llvm/test/CodeGen/WebAssembly/varargs.ll