Make musttail more robust for vector types on x86
authorReid Kleckner <reid@kleckner.net>
Mon, 22 Dec 2014 23:58:37 +0000 (23:58 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 22 Dec 2014 23:58:37 +0000 (23:58 +0000)
commit34b7fde802ac1fcacc41bf3687cfc37e5ccea3f3
tree53ab3e86e68e1156b1bb5b7dadf8e4b67f85d16f
parentb39244dca3aed4a2d359dd4f760d10bb264ad9be
Make musttail more robust for vector types on x86

Previously I tried to plug musttail into the existing vararg lowering
code. That turned out to be a mistake, because non-vararg calls use
significantly different register lowering, even on x86. For example, AVX
vectors are usually passed in registers to normal functions and memory
to vararg functions.  Now musttail uses a completely separate lowering.

Hopefully this can be used as the basis for non-x86 perfect forwarding.

Reviewers: majnemer

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224745 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/CallingConvLower.h
lib/CodeGen/CallingConvLower.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86MachineFunctionInfo.h
test/CodeGen/X86/musttail-fastcall.ll [new file with mode: 0644]
test/CodeGen/X86/musttail-varargs.ll