From fe14cf7eedbcc7ccc867ba5116c3553718d22ecf Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 2 Feb 2015 20:34:40 +0000 Subject: Pull in r227752 from upstream llvm trunk (by Michael Kuperstein): [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 This helps to get sys/boot/i386/boot2 below the required size again, when optimizing with -Oz. --- contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp') diff --git a/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp b/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp index 1557d10..e3f0191 100644 --- a/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp +++ b/contrib/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(); +} -- cgit v1.1