[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)
commitacd5f13c889cc39e72bee7b0426f8ef3426a09c3
tree299aa18fdc0f7b9ed880fae56346e96241baad43
parent114a93ecd26b1b2befbea5cd3edeedb9da8718c3
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227752 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