Commit 75cfe445 by Bill Schmidt Committed by William Schmidt

invoke.texi: Add -fhoist-adjacent-loads and -ftree-slsr to list of flags controlling...

2012-07-18  Bill Schmidt  <wschmidt@linux.ibm.com>

	* doc/invoke.texi: Add -fhoist-adjacent-loads and -ftree-slsr to list
	of flags controlling optimization; add -ftree-slsr to list of flags
	enabled by default at -O; add -fhoist-adjacent-loads to list of flags
	enabled by default at -O2; add -fvect-cost-model to list of flags
	enabled by default at -O3; document -fhoist-adjacent-loads and
	-ftree-slsr.
	* opts.c (default_option): Make -ftree-slsr default at -O1 and above.
	* gimple-ssa-strength-reduction.c (gate_strength_reduction): Use
	flag_tree_slsr.
	* common.opt: Add -ftree-slsr with flag_tree_slsr.

From-SVN: r189617
parent a712b009
2012-07-18 Bill Schmidt <wschmidt@linux.ibm.com>
* doc/invoke.texi: Add -fhoist-adjacent-loads and -ftree-slsr to list
of flags controlling optimization; add -ftree-slsr to list of flags
enabled by default at -O; add -fhoist-adjacent-loads to list of flags
enabled by default at -O2; add -fvect-cost-model to list of flags
enabled by default at -O3; document -fhoist-adjacent-loads and
-ftree-slsr.
* opts.c (default_option): Make -ftree-slsr default at -O1 and above.
* gimple-ssa-strength-reduction.c (gate_strength_reduction): Use
flag_tree_slsr.
* common.opt: Add -ftree-slsr with flag_tree_slsr.
2012-07-18 Jie Zhang <jzhang918@gmail.com> 2012-07-18 Jie Zhang <jzhang918@gmail.com>
Julian Brown <julian@codesourcery.com> Julian Brown <julian@codesourcery.com>
......
...@@ -2080,6 +2080,10 @@ ftree-sink ...@@ -2080,6 +2080,10 @@ ftree-sink
Common Report Var(flag_tree_sink) Optimization Common Report Var(flag_tree_sink) Optimization
Enable SSA code sinking on trees Enable SSA code sinking on trees
ftree-slsr
Common Report Var(flag_tree_slsr) Optimization
Perform straight-line strength reduction
ftree-sra ftree-sra
Common Report Var(flag_tree_sra) Optimization Common Report Var(flag_tree_sra) Optimization
Perform scalar replacement of aggregates Perform scalar replacement of aggregates
......
...@@ -364,7 +364,8 @@ Objective-C and Objective-C++ Dialects}. ...@@ -364,7 +364,8 @@ Objective-C and Objective-C++ Dialects}.
-ffast-math -ffinite-math-only -ffloat-store -fexcess-precision=@var{style} @gol -ffast-math -ffinite-math-only -ffloat-store -fexcess-precision=@var{style} @gol
-fforward-propagate -ffp-contract=@var{style} -ffunction-sections @gol -fforward-propagate -ffp-contract=@var{style} -ffunction-sections @gol
-fgcse -fgcse-after-reload -fgcse-las -fgcse-lm -fgraphite-identity @gol -fgcse -fgcse-after-reload -fgcse-las -fgcse-lm -fgraphite-identity @gol
-fgcse-sm -fif-conversion -fif-conversion2 -findirect-inlining @gol -fgcse-sm -fhoist-adjacent-loads -fif-conversion @gol
-fif-conversion2 -findirect-inlining @gol
-finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol -finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol
-finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg @gol -finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg @gol
-fipa-pta -fipa-profile -fipa-pure-const -fipa-reference @gol -fipa-pta -fipa-profile -fipa-pure-const -fipa-reference @gol
...@@ -413,8 +414,8 @@ Objective-C and Objective-C++ Dialects}. ...@@ -413,8 +414,8 @@ Objective-C and Objective-C++ Dialects}.
-ftree-phiprop -ftree-loop-distribution -ftree-loop-distribute-patterns @gol -ftree-phiprop -ftree-loop-distribution -ftree-loop-distribute-patterns @gol
-ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol -ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol
-ftree-parallelize-loops=@var{n} -ftree-pre -ftree-partial-pre -ftree-pta @gol -ftree-parallelize-loops=@var{n} -ftree-pre -ftree-partial-pre -ftree-pta @gol
-ftree-reassoc @gol -ftree-reassoc -ftree-sink -ftree-slsr -ftree-sra @gol
-ftree-sink -ftree-sra -ftree-switch-conversion -ftree-tail-merge @gol -ftree-switch-conversion -ftree-tail-merge @gol
-ftree-ter -ftree-vect-loop-version -ftree-vectorize -ftree-vrp @gol -ftree-ter -ftree-vect-loop-version -ftree-vectorize -ftree-vrp @gol
-funit-at-a-time -funroll-all-loops -funroll-loops @gol -funit-at-a-time -funroll-all-loops -funroll-loops @gol
-funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol -funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol
...@@ -6260,6 +6261,7 @@ compilation time. ...@@ -6260,6 +6261,7 @@ compilation time.
-ftree-forwprop @gol -ftree-forwprop @gol
-ftree-fre @gol -ftree-fre @gol
-ftree-phiprop @gol -ftree-phiprop @gol
-ftree-slsr @gol
-ftree-sra @gol -ftree-sra @gol
-ftree-pta @gol -ftree-pta @gol
-ftree-ter @gol -ftree-ter @gol
...@@ -6287,6 +6289,7 @@ also turns on the following optimization flags: ...@@ -6287,6 +6289,7 @@ also turns on the following optimization flags:
-fdevirtualize @gol -fdevirtualize @gol
-fexpensive-optimizations @gol -fexpensive-optimizations @gol
-fgcse -fgcse-lm @gol -fgcse -fgcse-lm @gol
-fhoist-adjacent-loads @gol
-finline-small-functions @gol -finline-small-functions @gol
-findirect-inlining @gol -findirect-inlining @gol
-fipa-sra @gol -fipa-sra @gol
...@@ -6312,6 +6315,7 @@ Optimize yet more. @option{-O3} turns on all optimizations specified ...@@ -6312,6 +6315,7 @@ Optimize yet more. @option{-O3} turns on all optimizations specified
by @option{-O2} and also turns on the @option{-finline-functions}, by @option{-O2} and also turns on the @option{-finline-functions},
@option{-funswitch-loops}, @option{-fpredictive-commoning}, @option{-funswitch-loops}, @option{-fpredictive-commoning},
@option{-fgcse-after-reload}, @option{-ftree-vectorize}, @option{-fgcse-after-reload}, @option{-ftree-vectorize},
@option{-fvect-cost-model},
@option{-ftree-partial-pre} and @option{-fipa-cp-clone} options. @option{-ftree-partial-pre} and @option{-fipa-cp-clone} options.
@item -O0 @item -O0
...@@ -7130,6 +7134,13 @@ This flag is enabled by default at @option{-O} and higher. ...@@ -7130,6 +7134,13 @@ This flag is enabled by default at @option{-O} and higher.
Perform hoisting of loads from conditional pointers on trees. This Perform hoisting of loads from conditional pointers on trees. This
pass is enabled by default at @option{-O} and higher. pass is enabled by default at @option{-O} and higher.
@item -fhoist-adjacent-loads
@opindex hoist-adjacent-loads
Speculatively hoist loads from both branches of an if-then-else if the
loads are from adjacent locations in the same structure and the target
architecture has a conditional move instruction. This flag is enabled
by default at @option{-O2} and higher.
@item -ftree-copy-prop @item -ftree-copy-prop
@opindex ftree-copy-prop @opindex ftree-copy-prop
Perform copy propagation on trees. This pass eliminates unnecessary Perform copy propagation on trees. This pass eliminates unnecessary
...@@ -7530,6 +7541,13 @@ defining expression. This results in non-GIMPLE code, but gives the expanders ...@@ -7530,6 +7541,13 @@ defining expression. This results in non-GIMPLE code, but gives the expanders
much more complex trees to work on resulting in better RTL generation. This is much more complex trees to work on resulting in better RTL generation. This is
enabled by default at @option{-O} and higher. enabled by default at @option{-O} and higher.
@item -ftree-slsr
@opindex ftree-slsr
Perform straight-line strength reduction on trees. This recognizes related
expressions involving multiplications and replaces them by less expensive
calculations when possible. This is enabled by default at @option{-O} and
higher.
@item -ftree-vectorize @item -ftree-vectorize
@opindex ftree-vectorize @opindex ftree-vectorize
Perform loop vectorization on trees. This flag is enabled by default at Perform loop vectorization on trees. This flag is enabled by default at
...@@ -7551,7 +7569,8 @@ except at level @option{-Os} where it is disabled. ...@@ -7551,7 +7569,8 @@ except at level @option{-Os} where it is disabled.
@item -fvect-cost-model @item -fvect-cost-model
@opindex fvect-cost-model @opindex fvect-cost-model
Enable cost model for vectorization. Enable cost model for vectorization. This option is enabled by default at
@option{-O3}.
@item -ftree-vrp @item -ftree-vrp
@opindex ftree-vrp @opindex ftree-vrp
......
...@@ -1501,7 +1501,7 @@ execute_strength_reduction (void) ...@@ -1501,7 +1501,7 @@ execute_strength_reduction (void)
static bool static bool
gate_strength_reduction (void) gate_strength_reduction (void)
{ {
return optimize > 0; return flag_tree_slsr;
} }
struct gimple_opt_pass pass_strength_reduction = struct gimple_opt_pass pass_strength_reduction =
......
...@@ -452,6 +452,7 @@ static const struct default_options default_options_table[] = ...@@ -452,6 +452,7 @@ static const struct default_options default_options_table[] =
{ OPT_LEVELS_1_PLUS, OPT_ftree_ch, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_ftree_ch, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_fcombine_stack_adjustments, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_fcombine_stack_adjustments, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_fcompare_elim, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_fcompare_elim, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_ftree_slsr, 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 },
......
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