summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-15 12:26:48 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-15 12:26:48 +0000
commit408c3c778db3bf85c896dd76fd281b190d06cb3e (patch)
tree1818051a5c78b937696e26c156e5645bc99247d6
parentbd8d8d8190891d693eadea6c938b5eed2c031a70 (diff)
downloadgcc-408c3c778db3bf85c896dd76fd281b190d06cb3e.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147571 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/common.opt12
-rw-r--r--gcc/doc/invoke.texi26
-rw-r--r--gcc/tree-ssa-forwprop.c2
-rw-r--r--gcc/tree-ssa-phiprop.c2
-rw-r--r--gcc/tree-ssa-structalias.c7
6 files changed, 54 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ac138cab0d4..f3b70b09c48 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+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>
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Also
diff --git a/gcc/common.opt b/gcc/common.opt
index 2d372e7ebd4..d29b0c1752e 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1202,6 +1202,10 @@ ftree-dse
Common Report Var(flag_tree_dse) Optimization
Enable dead store elimination
+ftree-forwprop
+Common Report Var(flag_tree_forwprop) Init(1) Optimization
+Enable forward propagation on trees
+
ftree-fre
Common Report Var(flag_tree_fre) Optimization
Enable Full Redundancy Elimination (FRE) on trees
@@ -1230,10 +1234,18 @@ ftree-parallelize-loops=
Common Report Joined UInteger Var(flag_tree_parallelize_loops) Init(1)
Enable automatic parallelization of loops
+ftree-phiprop
+Common Report Var(flag_tree_phiprop) Init(1) Optimization
+Enable hoisting loads from conditional pointers.
+
ftree-pre
Common Report Var(flag_tree_pre) Optimization
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
Common Report Var(flag_tree_reassoc) Init(1) Optimization
Enable reassociation on tree level
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 3dbb8c570ae..d22d1da942f 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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-dom@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-forwprop@r{[}-@var{n}@r{]} @gol
-fdump-tree-copyrename@r{[}-@var{n}@r{]} @gol
-fdump-tree-nrv -fdump-tree-vect @gol
-fdump-tree-sink @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-vrp@r{[}-@var{n}@r{]} @gol
-ftree-vectorizer-verbose=@var{n} @gol
@@ -368,10 +370,10 @@ Objective-C and Objective-C++ Dialects}.
-fstrict-aliasing -fstrict-overflow -fthread-jumps -ftracer @gol
-ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copy-prop @gol
-ftree-copyrename -ftree-dce @gol
--ftree-dominator-opts -ftree-dse -ftree-fre -ftree-loop-im @gol
--ftree-loop-distribution @gol
+-ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-loop-im @gol
+-ftree-phiprop -ftree-loop-distribution @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-ter -ftree-vect-loop-version -ftree-vectorize -ftree-vrp @gol
-funit-at-a-time -funroll-all-loops -funroll-loops @gol
@@ -5448,8 +5450,11 @@ compilation time.
-ftree-dce @gol
-ftree-dominator-opts @gol
-ftree-dse @gol
+-ftree-forwprop @gol
-ftree-fre @gol
+-ftree-phiprop @gol
-ftree-sra @gol
+-ftree-pta @gol
-ftree-ter @gol
-funit-at-a-time}
@@ -6162,6 +6167,11 @@ at @option{-O} and higher.
Perform partial redundancy elimination (PRE) on trees. This flag is
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
@opindex ftree-fre
Perform full redundancy elimination (FRE) on trees. The difference
@@ -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 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
@opindex ftree-copy-prop
Perform copy propagation on trees. This pass eliminates unnecessary
@@ -6436,6 +6451,11 @@ rather than constrained e.g.@: by memory bandwidth. This option
implies @option{-pthread}, and thus is only supported on targets
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
@opindex ftree-sra
Perform scalar replacement of aggregates. This pass replaces structure
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index ef78703c8ee..31f2ad71640 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -1346,7 +1346,7 @@ tree_ssa_forward_propagate_single_use_vars (void)
static bool
gate_forwprop (void)
{
- return 1;
+ return flag_tree_forwprop;
}
struct gimple_opt_pass pass_forwprop =
diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c
index 6ccc30ec808..022e4af9a48 100644
--- a/gcc/tree-ssa-phiprop.c
+++ b/gcc/tree-ssa-phiprop.c
@@ -381,7 +381,7 @@ tree_ssa_phiprop (void)
static bool
gate_phiprop (void)
{
- return 1;
+ return flag_tree_phiprop;
}
struct gimple_opt_pass pass_phiprop =
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 2f9a8e0c915..c830f2f8d75 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -5737,6 +5737,11 @@ compute_may_aliases (void)
return 0;
}
+static bool
+gate_tree_pta (void)
+{
+ return flag_tree_pta;
+}
/* A dummy pass to cause points-to information to be computed via
TODO_rebuild_alias. */
@@ -5746,7 +5751,7 @@ struct gimple_opt_pass pass_build_alias =
{
GIMPLE_PASS,
"alias", /* name */
- NULL, /* gate */
+ gate_tree_pta, /* gate */
NULL, /* execute */
NULL, /* sub */
NULL, /* next */