summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-02-02 20:34:40 +0000
committerdim <dim@FreeBSD.org>2015-02-02 20:34:40 +0000
commitfe14cf7eedbcc7ccc867ba5116c3553718d22ecf (patch)
tree9c796001015fe17ab4322360b2c8a2ba835b9d76 /contrib/llvm/lib/Target/X86/X86TargetMachine.cpp
parent8dc847406524920db5b69acab7d3f942c5ea65d3 (diff)
downloadFreeBSD-src-fe14cf7eedbcc7ccc867ba5116c3553718d22ecf.zip
FreeBSD-src-fe14cf7eedbcc7ccc867ba5116c3553718d22ecf.tar.gz
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.
Diffstat (limited to 'contrib/llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--contrib/llvm/lib/Target/X86/X86TargetMachine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp b/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp
index 5e6aa7d..1fc6b20 100644
--- a/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -154,6 +154,7 @@ public:
void addIRPasses() override;
bool addInstSelector() override;
bool addILPOpts() override;
+ void addPreRegAlloc() override;
void addPostRegAlloc() override;
void addPreEmitPass() override;
};
@@ -187,6 +188,10 @@ bool X86PassConfig::addILPOpts() {
return true;
}
+void X86PassConfig::addPreRegAlloc() {
+ addPass(createX86CallFrameOptimization());
+}
+
void X86PassConfig::addPostRegAlloc() {
addPass(createX86FloatingPointStackifierPass());
}
OpenPOWER on IntegriCloud