diff options
author | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-02-01 16:56:04 +0000 |
---|---|---|
committer | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-02-01 16:56:04 +0000 |
commit | 13fbd4526336365023875554a8a3765a38f93da6 (patch) | |
tree | 1d3a1d6138c45d7fdc3764dadf570ea4215b97be /llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp | |
parent | c28ffdcf3500edb14e70a779d263259208354442 (diff) | |
download | bcm5719-llvm-13fbd4526336365023875554a8a3765a38f93da6.tar.gz bcm5719-llvm-13fbd4526336365023875554a8a3765a38f93da6.zip |
[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
Diffstat (limited to 'llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp b/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp index 1557d10238e..e3f01912b87 100644 --- a/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp +++ b/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp @@ -42,3 +42,8 @@ int TargetFrameLowering::getFrameIndexReference(const MachineFunction &MF, FrameReg = RI->getFrameRegister(MF); return getFrameIndexOffset(MF, FI); } + +bool TargetFrameLowering::needsFrameIndexResolution( + const MachineFunction &MF) const { + return MF.getFrameInfo()->hasStackObjects(); +} |