[X86] Convert esp-relative movs of function arguments to pushes, step 2
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Sun, 1 Feb 2015 16:56:04 +0000 (16:56 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Sun, 1 Feb 2015 16:56:04 +0000 (16:56 +0000)
commit13fbd4526336365023875554a8a3765a38f93da6
tree1d3a1d6138c45d7fdc3764dadf570ea4215b97be
parentc28ffdcf3500edb14e70a779d263259208354442
[X86] Convert esp-relative movs of function arguments to pushes, step 2

This moves the transformation introduced in r223757 into a separate MI pass.
This allows it to cover many more cases (not only cases where there must be a
reserved call frame), and perform rudimentary call folding. It still doesn't
have a heuristic, so it is enabled only for optsize/minsize, with stack
alignment <= 8, where it ought to be a fairly clear win.

(Re-commit of r227728)

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

llvm-svn: 227752
17 files changed:
llvm/include/llvm/Target/TargetFrameLowering.h
llvm/lib/CodeGen/PrologEpilogInserter.cpp
llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
llvm/lib/Target/X86/CMakeLists.txt
llvm/lib/Target/X86/X86.h
llvm/lib/Target/X86/X86CallFrameOptimization.cpp [new file with mode: 0644]
llvm/lib/Target/X86/X86FastISel.cpp
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/lib/Target/X86/X86FrameLowering.h
llvm/lib/Target/X86/X86InstrCompiler.td
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/lib/Target/X86/X86InstrInfo.h
llvm/lib/Target/X86/X86MachineFunctionInfo.h
llvm/lib/Target/X86/X86RegisterInfo.cpp
llvm/lib/Target/X86/X86TargetMachine.cpp
llvm/test/CodeGen/X86/inalloca-invoke.ll
llvm/test/CodeGen/X86/movtopush.ll