[X86] Reapply r240257 : "Allow more call sequences to use push instructions for argum...
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Thu, 16 Jul 2015 13:54:14 +0000 (13:54 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Thu, 16 Jul 2015 13:54:14 +0000 (13:54 +0000)
commita53e7065738cf56ba7ccadbe0bb23e35c300d822
tree8ea03f08c7b7ce1a950cda79cca471d9c2b790b7
parent72400f8d50869f50a54b67146b17acaab0fcb16f
[X86] Reapply r240257 : "Allow more call sequences to use push instructions for argument passing"

This allows more call sequences to use pushes instead of movs when optimizing for size.
In particular, calling conventions that pass some parameters in registers (e.g. thiscall) are now supported.

This should no longer cause miscompiles, now that a bug in emitPrologue was fixed in r242395.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242398 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86CallFrameOptimization.cpp
test/CodeGen/X86/movtopush.ll