Commit 68f6df73 by Richard Biener Committed by Richard Biener

common.opt (fssa-phiopt): New option.

2014-06-18  Richard Biener  <rguenther@suse.de>

	* common.opt (fssa-phiopt): New option.
	* opts.c (default_options_table): Enable -fssa-phiopt with -O1+
	but not with -Og.
	* tree-ssa-phiopt.c (pass_phiopt): Add gate method.
	* doc/invoke.texi (-fssa-phiopt): Document.

From-SVN: r211772
parent 419d45db
2014-06-18 Richard Biener <rguenther@suse.de>
* common.opt (fssa-phiopt): New option.
* opts.c (default_options_table): Enable -fssa-phiopt with -O1+
but not with -Og.
* tree-ssa-phiopt.c (pass_phiopt): Add gate method.
* doc/invoke.texi (-fssa-phiopt): Document.
2014-06-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2014-06-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* genattrtab.c (n_bypassed): New variable. * genattrtab.c (n_bypassed): New variable.
......
...@@ -1950,6 +1950,10 @@ fsplit-wide-types ...@@ -1950,6 +1950,10 @@ fsplit-wide-types
Common Report Var(flag_split_wide_types) Optimization Common Report Var(flag_split_wide_types) Optimization
Split wide types into independent registers Split wide types into independent registers
fssa-phiopt
Common Report Var(flag_ssa_phiopt) Optimization
Optimize conditional patterns using SSA PHI nodes
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
......
...@@ -412,7 +412,7 @@ Objective-C and Objective-C++ Dialects}. ...@@ -412,7 +412,7 @@ Objective-C and Objective-C++ Dialects}.
-fselective-scheduling -fselective-scheduling2 @gol -fselective-scheduling -fselective-scheduling2 @gol
-fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @gol -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @gol
-fshrink-wrap -fsignaling-nans -fsingle-precision-constant @gol -fshrink-wrap -fsignaling-nans -fsingle-precision-constant @gol
-fsplit-ivs-in-unroller -fsplit-wide-types -fstack-protector @gol -fsplit-ivs-in-unroller -fsplit-wide-types -fssa-phiopt -fstack-protector @gol
-fstack-protector-all -fstack-protector-strong -fstrict-aliasing @gol -fstack-protector-all -fstack-protector-strong -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
...@@ -6907,6 +6907,7 @@ compilation time. ...@@ -6907,6 +6907,7 @@ compilation time.
-ftree-bit-ccp @gol -ftree-bit-ccp @gol
-ftree-builtin-call-dce @gol -ftree-builtin-call-dce @gol
-ftree-ccp @gol -ftree-ccp @gol
-fssa-phiopt @gol
-ftree-ch @gol -ftree-ch @gol
-ftree-copyrename @gol -ftree-copyrename @gol
-ftree-dce @gol -ftree-dce @gol
...@@ -7892,6 +7893,11 @@ Perform sparse conditional constant propagation (CCP) on trees. This ...@@ -7892,6 +7893,11 @@ Perform sparse conditional constant propagation (CCP) on trees. This
pass only operates on local scalar variables and is enabled by default pass only operates on local scalar variables and is enabled by default
at @option{-O} and higher. at @option{-O} and higher.
@item -fssa-phiopt
@opindex fssa-phiopt
Perform pattern matching on SSA PHI nodes to optimize conditional
code. This pass is enabled by default at @option{-O} and higher.
@item -ftree-switch-conversion @item -ftree-switch-conversion
Perform conversion of simple initializations in a switch to Perform conversion of simple initializations in a switch to
initializations from a scalar array. This flag is enabled by default initializations from a scalar array. This flag is enabled by default
......
...@@ -457,6 +457,7 @@ static const struct default_options default_options_table[] = ...@@ -457,6 +457,7 @@ static const struct default_options default_options_table[] =
{ OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fbranch_count_reg, NULL, 1 }, { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fbranch_count_reg, NULL, 1 },
{ OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fmove_loop_invariants, NULL, 1 }, { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fmove_loop_invariants, NULL, 1 },
{ OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_ftree_pta, NULL, 1 }, { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_ftree_pta, NULL, 1 },
{ OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fssa_phiopt, NULL, 1 },
/* -O2 optimizations. */ /* -O2 optimizations. */
{ OPT_LEVELS_2_PLUS, OPT_finline_small_functions, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_finline_small_functions, NULL, 1 },
......
...@@ -2332,6 +2332,7 @@ public: ...@@ -2332,6 +2332,7 @@ public:
/* opt_pass methods: */ /* opt_pass methods: */
opt_pass * clone () { return new pass_phiopt (m_ctxt); } opt_pass * clone () { return new pass_phiopt (m_ctxt); }
virtual bool gate (function *) { return flag_ssa_phiopt; }
virtual unsigned int execute (function *) virtual unsigned int execute (function *)
{ {
return tree_ssa_phiopt_worker (false, gate_hoist_loads ()); return tree_ssa_phiopt_worker (false, gate_hoist_loads ());
......
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