]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
common.opt (fssa-phiopt): New option.
authorRichard Biener <rguenther@suse.de>
Wed, 18 Jun 2014 08:33:44 +0000 (08:33 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 18 Jun 2014 08:33:44 +0000 (08:33 +0000)
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

gcc/ChangeLog
gcc/common.opt
gcc/doc/invoke.texi
gcc/opts.c
gcc/tree-ssa-phiopt.c

index 98042bb709b8613631f45d184b84ac5409d451fe..39fa9c24ff6cd6169325dcafcba893bd9086030e 100644 (file)
@@ -1,3 +1,11 @@
+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>
 
        * genattrtab.c (n_bypassed): New variable.
index 7f0509229d01ba90a8354d16ea184c28bfec30e7..de13e01755cc221f95e1605af8d4874fa593eb49 100644 (file)
@@ -1950,6 +1950,10 @@ fsplit-wide-types
 Common Report Var(flag_split_wide_types) Optimization
 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
 Common Report Var(flag_variable_expansion_in_unroller) Optimization
 Apply variable expansion when loops are unrolled
index 9a34f1cb9776db7b2fa212debeb4a706785a7a15..f7a54facdae19b35a060f1504873ea03877e2383 100644 (file)
@@ -412,7 +412,7 @@ Objective-C and Objective-C++ Dialects}.
 -fselective-scheduling -fselective-scheduling2 @gol
 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops @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
 -fstrict-overflow -fthread-jumps -ftracer -ftree-bit-ccp @gol
 -ftree-builtin-call-dce -ftree-ccp -ftree-ch @gol
@@ -6907,6 +6907,7 @@ compilation time.
 -ftree-bit-ccp @gol
 -ftree-builtin-call-dce @gol
 -ftree-ccp @gol
+-fssa-phiopt @gol
 -ftree-ch @gol
 -ftree-copyrename @gol
 -ftree-dce @gol
@@ -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
 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
 Perform conversion of simple initializations in a switch to
 initializations from a scalar array.  This flag is enabled by default
index 2b1280a76ff5d0eec459a7410c8d423b857bb2c9..324d54512ad2e3efb8e6ddc750206fa8efe52c34 100644 (file)
@@ -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_fmove_loop_invariants, 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.  */
     { OPT_LEVELS_2_PLUS, OPT_finline_small_functions, NULL, 1 },
index 95844f461859633524c1fa88e0af1580db7c4800..54002996cc48ffeaf9364aa1f035001c3fadae78 100644 (file)
@@ -2332,6 +2332,7 @@ public:
 
   /* opt_pass methods: */
   opt_pass * clone () { return new pass_phiopt (m_ctxt); }
+  virtual bool gate (function *) { return flag_ssa_phiopt; }
   virtual unsigned int execute (function *)
     {
       return tree_ssa_phiopt_worker (false, gate_hoist_loads ());