ARM / x86_64 varargs: Don't save regparms in prologue without va_start
authorReid Kleckner <reid@kleckner.net>
Fri, 22 Aug 2014 21:59:26 +0000 (21:59 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 22 Aug 2014 21:59:26 +0000 (21:59 +0000)
commitd89c0abc0724945e3181f3aaef023b292e53baad
tree94a98cad9095854e12917f75215122f82f1b47a8
parente5e847a500ef0726f343a3f69492026de54fb4c2
ARM / x86_64 varargs: Don't save regparms in prologue without va_start

There's no need to do this if the user doesn't call va_start. In the
future, we're going to have thunks that forward these register
parameters with musttail calls, and they won't need these spills for
handling va_start.

Most of the test suite changes are adding va_start calls to existing
tests to keep things working.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216294 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm/CodeGen/MachineFrameInfo.h
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/ARM/fold-stack-adjust.ll
test/CodeGen/ARM/thumb1_return_sequence.ll
test/CodeGen/ARM/vararg_no_start.ll [new file with mode: 0644]
test/CodeGen/ARM/vargs_align.ll
test/CodeGen/Thumb/pop.ll
test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll
test/CodeGen/X86/vararg_no_start.ll [new file with mode: 0644]
test/CodeGen/X86/vastart-defs-eflags.ll