diff options
author | Tom de Vries <tom@codesourcery.com> | 2015-02-18 21:16:20 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2015-02-18 21:16:20 +0000 |
commit | 98ce9490b067e497a7ec904d2695ecd30af71bc8 (patch) | |
tree | df2082a9f5431c20971b2171803a45b082dc597f /gcc | |
parent | b06684b7abac241bb181ded2d045662086f53993 (diff) | |
download | gcc-98ce9490b067e497a7ec904d2695ecd30af71bc8.zip gcc-98ce9490b067e497a7ec904d2695ecd30af71bc8.tar.gz gcc-98ce9490b067e497a7ec904d2695ecd30af71bc8.tar.bz2 |
Add fstdarg-opt
2015-02-18 Tom de Vries <tom@codesourcery.com>
* common.opt (fstdarg-opt): New option.
* tree-stdarg.c (pass_stdarg::gate): Use flag_stdarg_opt.
* doc/invoke.texi (@item Optimization Options): Add -fstdarg-opt.
(@item -fstdarg-opt): New item.
From-SVN: r220800
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/common.opt | 4 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 7 | ||||
-rw-r--r-- | gcc/tree-stdarg.c | 5 |
4 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 35bcf40..4919a5f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-02-18 Tom de Vries <tom@codesourcery.com> + + * common.opt (fstdarg-opt): New option. + * tree-stdarg.c (pass_stdarg::gate): Use flag_stdarg_opt. + * doc/invoke.texi (@item Optimization Options): Add -fstdarg-opt. + (@item -fstdarg-opt): New item. + 2015-02-18 H.J. Lu <hongjiu.lu@intel.com> PR target/65064 diff --git a/gcc/common.opt b/gcc/common.opt index e0d4a1d..4fa12f5 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -2069,6 +2069,10 @@ fssa-phiopt Common Report Var(flag_ssa_phiopt) Optimization Optimize conditional patterns using SSA PHI nodes +fstdarg-opt +Common Report Var(flag_stdarg_opt) Init(1) Optimization +Optimize amount of stdarg registers saved to stack at start of function + fvariable-expansion-in-unroller Common Report Var(flag_variable_expansion_in_unroller) Optimization Apply variable expansion when loops are unrolled diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4a79b48..ef4cc75 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -430,7 +430,7 @@ Objective-C and Objective-C++ Dialects}. -fshrink-wrap -fsignaling-nans -fsingle-precision-constant @gol -fsplit-ivs-in-unroller -fsplit-wide-types -fssa-phiopt @gol -fstack-protector -fstack-protector-all -fstack-protector-strong @gol --fstack-protector-explicit -fstrict-aliasing @gol +-fstack-protector-explicit -fstdarg-opt -fstrict-aliasing @gol -fstrict-overflow -fthread-jumps -ftracer -ftree-bit-ccp @gol -ftree-builtin-call-dce -ftree-ccp -ftree-ch @gol -ftree-coalesce-inline-vars -ftree-coalesce-vars -ftree-copy-prop @gol @@ -9867,6 +9867,11 @@ references to local frame addresses. Like @option{-fstack-protector} but only protects those functions which have the @code{stack_protect} attribute +@item -fstdarg-opt +@opindex fstdarg-opt +Optimize the prologue of variadic argument functions with respect to usage of +those arguments. + @item -fsection-anchors @opindex fsection-anchors Try to reduce the number of symbolic address calculations by using diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index 2cf0ca3..17d51a2 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -704,8 +704,9 @@ public: /* opt_pass methods: */ virtual bool gate (function *fun) { - /* This optimization is only for stdarg functions. */ - return fun->stdarg != 0; + return (flag_stdarg_opt + /* This optimization is only for stdarg functions. */ + && fun->stdarg != 0); } virtual unsigned int execute (function *); |