[X86] Convert esp-relative movs of function arguments into pushes, step 1
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Tue, 9 Dec 2014 06:10:44 +0000 (06:10 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Tue, 9 Dec 2014 06:10:44 +0000 (06:10 +0000)
commitc69bb43f35cc89a758ed5569d28b2fa6f83a80d2
treead396f19032250316d5965267e19ecab6825e558
parent598bd05bd772c968c42ce64ea2bce92c32916ca0
[X86] Convert esp-relative movs of function arguments into pushes, step 1

This handles the simplest case for mov -> push conversion:
1. x86-32 calling convention, everything is passed through the stack.
2. There is no reserved call frame.
3. Only registers or immediates are pushed, no attempt to combine a mem-reg-mem sequence into a single PUSHmm.

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

llvm-svn: 223757
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/lib/Target/X86/X86FrameLowering.h
llvm/test/CodeGen/X86/force-align-stack-alloca.ll
llvm/test/CodeGen/X86/inalloca-ctor.ll
llvm/test/CodeGen/X86/inalloca-invoke.ll
llvm/test/CodeGen/X86/inalloca-stdcall.ll
llvm/test/CodeGen/X86/mem-intrin-base-reg.ll
llvm/test/CodeGen/X86/movtopush.ll [new file with mode: 0644]