aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
diff options
context:
space:
mode:
authorMichael Kuperstein <michael.m.kuperstein@intel.com>2015-02-01 11:44:44 +0000
committerMichael Kuperstein <michael.m.kuperstein@intel.com>2015-02-01 11:44:44 +0000
commitbd57186c763f9c47a6da570f56aceabd830e32a0 (patch)
treee50de967a38d0d8a6a12df08fd6a6628bd7f7d49 /llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
parentaf3c256ffa7110965cd05dcf49a9f4f70c7f225c (diff)
downloadllvm-bd57186c763f9c47a6da570f56aceabd830e32a0.zip
llvm-bd57186c763f9c47a6da570f56aceabd830e32a0.tar.gz
llvm-bd57186c763f9c47a6da570f56aceabd830e32a0.tar.bz2
[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
Diffstat (limited to 'llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp b/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
index 1557d102..e3f01912 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();
+}