[X86] A heuristic to estimate the size impact for converting stack-relative parameter...
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Thu, 12 Feb 2015 08:36:35 +0000 (08:36 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Thu, 12 Feb 2015 08:36:35 +0000 (08:36 +0000)
commitfd98d3be5557c9a5952f42669a4ef561fc79c064
treed10976d68a0af27b813ba3d42d97da5104b84d5c
parent9e9bde9b546136d739d2ed1173a4d25332bc660f
[X86] A heuristic to estimate the size impact for converting stack-relative parameter movs to pushes

This gives a rough estimate of whether using pushes instead of movs is profitable, in terms of size.
We go over all calls in the MachineFunction and compute:
a) For each callsite that can not use pushes, the penalty of not having a reserved call frame.
b) For each callsite that can use pushes, the gain of actually replacing the movs with pushes (and the potential penalty of having to readjust the stack).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228915 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86CallFrameOptimization.cpp
test/CodeGen/X86/movtopush.ll