[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)
commit59d99862593b6cfca1c1cb59366a8718e81080c3
tree1e9078901eb0dca1f2d0c083e3d7bf7086dccc8d
parent033773b0574d7d18f91d00f36c7a4f87b9f56d9b
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227728 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/llvm/Target/TargetFrameLowering.h
lib/CodeGen/PrologEpilogInserter.cpp
lib/CodeGen/TargetFrameLoweringImpl.cpp
lib/Target/X86/CMakeLists.txt
lib/Target/X86/X86.h
lib/Target/X86/X86CallFrameOptimization.cpp [new file with mode: 0644]
lib/Target/X86/X86FastISel.cpp
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86FrameLowering.h
lib/Target/X86/X86InstrCompiler.td
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86InstrInfo.h
lib/Target/X86/X86MachineFunctionInfo.h
lib/Target/X86/X86RegisterInfo.cpp
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/inalloca-invoke.ll
test/CodeGen/X86/movtopush.ll