Commit 98ce9490 by Tom de Vries Committed by Tom de Vries

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
parent b06684b7
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> 2015-02-18 H.J. Lu <hongjiu.lu@intel.com>
PR target/65064 PR target/65064
......
...@@ -2069,6 +2069,10 @@ fssa-phiopt ...@@ -2069,6 +2069,10 @@ fssa-phiopt
Common Report Var(flag_ssa_phiopt) Optimization Common Report Var(flag_ssa_phiopt) Optimization
Optimize conditional patterns using SSA PHI nodes 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 fvariable-expansion-in-unroller
Common Report Var(flag_variable_expansion_in_unroller) Optimization Common Report Var(flag_variable_expansion_in_unroller) Optimization
Apply variable expansion when loops are unrolled Apply variable expansion when loops are unrolled
......
...@@ -430,7 +430,7 @@ Objective-C and Objective-C++ Dialects}. ...@@ -430,7 +430,7 @@ Objective-C and Objective-C++ Dialects}.
-fshrink-wrap -fsignaling-nans -fsingle-precision-constant @gol -fshrink-wrap -fsignaling-nans -fsingle-precision-constant @gol
-fsplit-ivs-in-unroller -fsplit-wide-types -fssa-phiopt @gol -fsplit-ivs-in-unroller -fsplit-wide-types -fssa-phiopt @gol
-fstack-protector -fstack-protector-all -fstack-protector-strong @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 -fstrict-overflow -fthread-jumps -ftracer -ftree-bit-ccp @gol
-ftree-builtin-call-dce -ftree-ccp -ftree-ch @gol -ftree-builtin-call-dce -ftree-ccp -ftree-ch @gol
-ftree-coalesce-inline-vars -ftree-coalesce-vars -ftree-copy-prop @gol -ftree-coalesce-inline-vars -ftree-coalesce-vars -ftree-copy-prop @gol
...@@ -9867,6 +9867,11 @@ references to local frame addresses. ...@@ -9867,6 +9867,11 @@ references to local frame addresses.
Like @option{-fstack-protector} but only protects those functions which Like @option{-fstack-protector} but only protects those functions which
have the @code{stack_protect} attribute 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 @item -fsection-anchors
@opindex fsection-anchors @opindex fsection-anchors
Try to reduce the number of symbolic address calculations by using Try to reduce the number of symbolic address calculations by using
......
...@@ -704,8 +704,9 @@ public: ...@@ -704,8 +704,9 @@ public:
/* opt_pass methods: */ /* opt_pass methods: */
virtual bool gate (function *fun) virtual bool gate (function *fun)
{ {
/* This optimization is only for stdarg functions. */ return (flag_stdarg_opt
return fun->stdarg != 0; /* This optimization is only for stdarg functions. */
&& fun->stdarg != 0);
} }
virtual unsigned int execute (function *); virtual unsigned int execute (function *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment