[X86] Convert esp-relative movs of function arguments to pushes, step 2
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Sun, 1 Feb 2015 11:44:44 +0000 (11:44 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Sun, 1 Feb 2015 11:44:44 +0000 (11:44 +0000)
commitbd57186c763f9c47a6da570f56aceabd830e32a0
treee50de967a38d0d8a6a12df08fd6a6628bd7f7d49
parentaf3c256ffa7110965cd05dcf49a9f4f70c7f225c
[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.

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

llvm-svn: 227728
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