Commit 248fc9f3 by Richard Guenther Committed by Richard Biener

common.opt (-ftree-forwprop, [...]): New options, enabled by default.

2009-05-15  Richard Guenther  <rguenther@suse.de>

	* common.opt (-ftree-forwprop, -ftree-phiprop, -ftree-pta):
	New options, enabled by default.
	* doc/invoke.texi (-ftree-forwprop, -ftree-phiprop, -ftree-pta):
	Document.
	* tree-ssa-forwprop.c (gate_forwprop): Use flag_tree_forwprop.
	* tree-ssa-phiprop.c (gate_phiprop): Use flag_tree_phiprop.
	* tree-ssa-structalias.c (gate_tree_pta): New function.
	(pass_build_alias): Use it.

From-SVN: r147571
parent 16b29cc4
2009-05-15 Richard Guenther <rguenther@suse.de>
* common.opt (-ftree-forwprop, -ftree-phiprop, -ftree-pta):
New options, enabled by default.
* doc/invoke.texi (-ftree-forwprop, -ftree-phiprop, -ftree-pta):
Document.
* tree-ssa-forwprop.c (gate_forwprop): Use flag_tree_forwprop.
* tree-ssa-phiprop.c (gate_phiprop): Use flag_tree_phiprop.
* tree-ssa-structalias.c (gate_tree_pta): New function.
(pass_build_alias): Use it.
2009-05-15 Joseph Myers <joseph@codesourcery.com> 2009-05-15 Joseph Myers <joseph@codesourcery.com>
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also
......
...@@ -1202,6 +1202,10 @@ ftree-dse ...@@ -1202,6 +1202,10 @@ ftree-dse
Common Report Var(flag_tree_dse) Optimization Common Report Var(flag_tree_dse) Optimization
Enable dead store elimination Enable dead store elimination
ftree-forwprop
Common Report Var(flag_tree_forwprop) Init(1) Optimization
Enable forward propagation on trees
ftree-fre ftree-fre
Common Report Var(flag_tree_fre) Optimization Common Report Var(flag_tree_fre) Optimization
Enable Full Redundancy Elimination (FRE) on trees Enable Full Redundancy Elimination (FRE) on trees
...@@ -1230,10 +1234,18 @@ ftree-parallelize-loops= ...@@ -1230,10 +1234,18 @@ ftree-parallelize-loops=
Common Report Joined UInteger Var(flag_tree_parallelize_loops) Init(1) Common Report Joined UInteger Var(flag_tree_parallelize_loops) Init(1)
Enable automatic parallelization of loops Enable automatic parallelization of loops
ftree-phiprop
Common Report Var(flag_tree_phiprop) Init(1) Optimization
Enable hoisting loads from conditional pointers.
ftree-pre ftree-pre
Common Report Var(flag_tree_pre) Optimization Common Report Var(flag_tree_pre) Optimization
Enable SSA-PRE optimization on trees Enable SSA-PRE optimization on trees
ftree-pta
Common Report Var(flag_tree_pta) Init(1) Optimization
Perform function-local points-to analysis on trees.
ftree-reassoc ftree-reassoc
Common Report Var(flag_tree_reassoc) Init(1) Optimization Common Report Var(flag_tree_reassoc) Init(1) Optimization
Enable reassociation on tree level Enable reassociation on tree level
......
...@@ -290,12 +290,14 @@ Objective-C and Objective-C++ Dialects}. ...@@ -290,12 +290,14 @@ Objective-C and Objective-C++ Dialects}.
-fdump-tree-gimple@r{[}-raw@r{]} -fdump-tree-mudflap@r{[}-@var{n}@r{]} @gol -fdump-tree-gimple@r{[}-raw@r{]} -fdump-tree-mudflap@r{[}-@var{n}@r{]} @gol
-fdump-tree-dom@r{[}-@var{n}@r{]} @gol -fdump-tree-dom@r{[}-@var{n}@r{]} @gol
-fdump-tree-dse@r{[}-@var{n}@r{]} @gol -fdump-tree-dse@r{[}-@var{n}@r{]} @gol
-fdump-tree-phiprop@r{[}-@var{n}@r{]} @gol
-fdump-tree-phiopt@r{[}-@var{n}@r{]} @gol -fdump-tree-phiopt@r{[}-@var{n}@r{]} @gol
-fdump-tree-forwprop@r{[}-@var{n}@r{]} @gol -fdump-tree-forwprop@r{[}-@var{n}@r{]} @gol
-fdump-tree-copyrename@r{[}-@var{n}@r{]} @gol -fdump-tree-copyrename@r{[}-@var{n}@r{]} @gol
-fdump-tree-nrv -fdump-tree-vect @gol -fdump-tree-nrv -fdump-tree-vect @gol
-fdump-tree-sink @gol -fdump-tree-sink @gol
-fdump-tree-sra@r{[}-@var{n}@r{]} @gol -fdump-tree-sra@r{[}-@var{n}@r{]} @gol
-fdump-tree-forwprop@r{[}-@var{n}@r{]} @gol
-fdump-tree-fre@r{[}-@var{n}@r{]} @gol -fdump-tree-fre@r{[}-@var{n}@r{]} @gol
-fdump-tree-vrp@r{[}-@var{n}@r{]} @gol -fdump-tree-vrp@r{[}-@var{n}@r{]} @gol
-ftree-vectorizer-verbose=@var{n} @gol -ftree-vectorizer-verbose=@var{n} @gol
...@@ -368,10 +370,10 @@ Objective-C and Objective-C++ Dialects}. ...@@ -368,10 +370,10 @@ Objective-C and Objective-C++ Dialects}.
-fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer @gol -fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer @gol
-ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copy-prop @gol -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copy-prop @gol
-ftree-copyrename -ftree-dce @gol -ftree-copyrename -ftree-dce @gol
-ftree-dominator-opts -ftree-dse -ftree-fre -ftree-loop-im @gol -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-loop-im @gol
-ftree-loop-distribution @gol -ftree-phiprop -ftree-loop-distribution @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-reassoc @gol -ftree-parallelize-loops=@var{n} -ftree-pre -ftree-pta -ftree-reassoc @gol
-ftree-sink -ftree-sra -ftree-switch-conversion @gol -ftree-sink -ftree-sra -ftree-switch-conversion @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
...@@ -5448,8 +5450,11 @@ compilation time. ...@@ -5448,8 +5450,11 @@ compilation time.
-ftree-dce @gol -ftree-dce @gol
-ftree-dominator-opts @gol -ftree-dominator-opts @gol
-ftree-dse @gol -ftree-dse @gol
-ftree-forwprop @gol
-ftree-fre @gol -ftree-fre @gol
-ftree-phiprop @gol
-ftree-sra @gol -ftree-sra @gol
-ftree-pta @gol
-ftree-ter @gol -ftree-ter @gol
-funit-at-a-time} -funit-at-a-time}
...@@ -6162,6 +6167,11 @@ at @option{-O} and higher. ...@@ -6162,6 +6167,11 @@ at @option{-O} and higher.
Perform partial redundancy elimination (PRE) on trees. This flag is Perform partial redundancy elimination (PRE) on trees. This flag is
enabled by default at @option{-O2} and @option{-O3}. enabled by default at @option{-O2} and @option{-O3}.
@item -ftree-forwprop
@opindex ftree-forwprop
Perform forward propagation on trees. This flag is enabled by default
at @option{-O} and higher.
@item -ftree-fre @item -ftree-fre
@opindex ftree-fre @opindex ftree-fre
Perform full redundancy elimination (FRE) on trees. The difference Perform full redundancy elimination (FRE) on trees. The difference
...@@ -6170,6 +6180,11 @@ that are computed on all paths leading to the redundant computation. ...@@ -6170,6 +6180,11 @@ that are computed on all paths leading to the redundant computation.
This analysis is faster than PRE, though it exposes fewer redundancies. This analysis is faster than PRE, though it exposes fewer redundancies.
This flag is enabled by default at @option{-O} and higher. This flag is enabled by default at @option{-O} and higher.
@item -ftree-phiprop
@opindex ftree-phiprop
Perform hoisting of loads from conditional pointers on trees. This
pass is enabled by default at @option{-O} 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
...@@ -6436,6 +6451,11 @@ rather than constrained e.g.@: by memory bandwidth. This option ...@@ -6436,6 +6451,11 @@ rather than constrained e.g.@: by memory bandwidth. This option
implies @option{-pthread}, and thus is only supported on targets implies @option{-pthread}, and thus is only supported on targets
that have support for @option{-pthread}. that have support for @option{-pthread}.
@item -ftree-pta
@opindex ftree-pta
Perform function-local points-to analysis on trees. This flag is
enabled by default at @option{-O} and higher.
@item -ftree-sra @item -ftree-sra
@opindex ftree-sra @opindex ftree-sra
Perform scalar replacement of aggregates. This pass replaces structure Perform scalar replacement of aggregates. This pass replaces structure
......
...@@ -1346,7 +1346,7 @@ tree_ssa_forward_propagate_single_use_vars (void) ...@@ -1346,7 +1346,7 @@ tree_ssa_forward_propagate_single_use_vars (void)
static bool static bool
gate_forwprop (void) gate_forwprop (void)
{ {
return 1; return flag_tree_forwprop;
} }
struct gimple_opt_pass pass_forwprop = struct gimple_opt_pass pass_forwprop =
......
...@@ -381,7 +381,7 @@ tree_ssa_phiprop (void) ...@@ -381,7 +381,7 @@ tree_ssa_phiprop (void)
static bool static bool
gate_phiprop (void) gate_phiprop (void)
{ {
return 1; return flag_tree_phiprop;
} }
struct gimple_opt_pass pass_phiprop = struct gimple_opt_pass pass_phiprop =
......
...@@ -5737,6 +5737,11 @@ compute_may_aliases (void) ...@@ -5737,6 +5737,11 @@ compute_may_aliases (void)
return 0; return 0;
} }
static bool
gate_tree_pta (void)
{
return flag_tree_pta;
}
/* A dummy pass to cause points-to information to be computed via /* A dummy pass to cause points-to information to be computed via
TODO_rebuild_alias. */ TODO_rebuild_alias. */
...@@ -5746,7 +5751,7 @@ struct gimple_opt_pass pass_build_alias = ...@@ -5746,7 +5751,7 @@ struct gimple_opt_pass pass_build_alias =
{ {
GIMPLE_PASS, GIMPLE_PASS,
"alias", /* name */ "alias", /* name */
NULL, /* gate */ gate_tree_pta, /* gate */
NULL, /* execute */ NULL, /* execute */
NULL, /* sub */ NULL, /* sub */
NULL, /* next */ NULL, /* next */
......
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