This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] minor documentation and miscellaneous fixes [patch]


Updates some documentation, removes 'bool' arguments from
function arguments and removes the -ftree-ssa switch (it's now
implied by -O[123]).


Bootstrapped and tested on x86.


Diego.



	* c-decl.c (c_expand_body): Invoke tree optimizers with -O1 and
	above.
	* flags.h (flag_tree_ssa): Remove.
	* tree-cfg.c (find_expr_in_tree_helper): Change last argument type
	to int.
	* tree-dfa.c (create_ref): Ditto.
	* tree-flow.h (num_referenced_vars): Change type to unsigned long.
	* doc/invoke.texi (-ftree-ssa): Remove.
	(-fdump-tree-{pre,ccp,dce}): Add to the summary section.
	(-fdump-tree-xxx-details): Update documentation.
	(-fdump-tree-ccp): Document.
	(-fdump-tree-simple): Move elsewhere.


Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.334.2.11
diff -d -u -p -r1.334.2.11 c-decl.c
--- c-decl.c	26 Aug 2002 01:34:49 -0000	1.334.2.11
+++ c-decl.c	19 Sep 2002 21:10:29 -0000
@@ -6524,12 +6524,14 @@ c_expand_body (fndecl, nested_p, can_def
 	{
 	  mudflap_c_function (fndecl);
 
-	  /* Simplify mudflap instrumentation.  */
+	  /* Simplify mudflap instrumentation.  FIXME  Long term: Would it
+	     be better for mudflap to simplify each tree as it generates
+	     them?  */
 	  simplify_function_tree (fndecl);
 	}
 
       /* Invoke the SSA tree optimizer.  */
-      if (flag_tree_ssa)
+      if (optimize >= 1)
 	optimize_function_tree (fndecl);
     }
 
Index: flags.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flags.h,v
retrieving revision 1.86.2.9
diff -d -u -p -r1.86.2.9 flags.h
--- flags.h	19 Sep 2002 16:30:01 -0000	1.86.2.9
+++ flags.h	19 Sep 2002 21:10:29 -0000
@@ -670,9 +670,6 @@ extern int flag_mudflap;
 /* Disable tree simplification.  */
 extern int flag_disable_simple;
 
-/* Enable the SSA tree optimizer.  */
-extern int flag_tree_ssa;
-
 /* Enable the SSA-PRE on trees.  */
 extern int flag_tree_pre;
 
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.9
diff -d -u -p -r1.1.4.9 tree-cfg.c
--- tree-cfg.c	9 Sep 2002 11:30:10 -0000	1.1.4.9
+++ tree-cfg.c	19 Sep 2002 21:10:30 -0000
@@ -89,7 +89,7 @@ static void insert_before_normal_stmt PA
 static void insert_after_ctrl_stmt PARAMS ((tree, basic_block));
 static void insert_after_normal_stmt PARAMS ((tree, tree, basic_block));
 static void insert_after_loop_body PARAMS ((tree, basic_block));
-static tree *find_expr_in_tree_helper PARAMS ((tree, tree, int, bool));
+static tree *find_expr_in_tree_helper PARAMS ((tree, tree, int, int));
 
 
 /* Create basic blocks.  */
@@ -2294,7 +2294,7 @@ find_expr_in_tree_helper (t, expr, level
      tree t;
      tree expr;
      int level;
-     bool substate;
+     int substate;
 {
   int i;
   tree *loc;
Index: tree-dfa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-dfa.c,v
retrieving revision 1.1.4.21
diff -d -u -p -r1.1.4.21 tree-dfa.c
--- tree-dfa.c	19 Sep 2002 19:01:00 -0000	1.1.4.21
+++ tree-dfa.c	19 Sep 2002 21:10:30 -0000
@@ -697,7 +697,7 @@ create_ref (var, ref_type, bb, parent_st
      tree parent_stmt;
      tree parent_expr;
      tree *operand_p;
-     bool add_to_bb;
+     int add_to_bb;
 {
   tree_ref ref;
 
Index: tree-flow.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-flow.h,v
retrieving revision 1.1.4.17
diff -d -u -p -r1.1.4.17 tree-flow.h
--- tree-flow.h	18 Sep 2002 22:50:47 -0000	1.1.4.17
+++ tree-flow.h	19 Sep 2002 21:10:30 -0000
@@ -605,7 +605,7 @@ extern ref_list call_sites;
 extern HOST_WIDE_INT next_tree_ref_id;
 
 /* Accessors for the referenced_vars array.  */
-extern size_t num_referenced_vars;
+extern unsigned long num_referenced_vars;
 
 static inline tree referenced_var PARAMS ((size_t));
 static inline tree
@@ -665,7 +665,7 @@ extern void remove_tree_ann		PARAMS ((tr
 extern tree_ann create_tree_ann 	PARAMS ((tree));
 extern tree_ref create_ref		PARAMS ((tree, HOST_WIDE_INT,
 						 basic_block, tree, tree,
-						 tree *, bool));
+						 tree *, int));
 extern void debug_ref			PARAMS ((tree_ref));
 extern void dump_ref			PARAMS ((FILE *, const char *, tree_ref,
       						 int, int));
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.152.2.16
diff -d -u -p -r1.152.2.16 invoke.texi
--- doc/invoke.texi	19 Sep 2002 16:46:44 -0000	1.152.2.16
+++ doc/invoke.texi	19 Sep 2002 21:10:33 -0000
@@ -249,7 +249,8 @@ in the following sections.
 -fdump-tree-original@r{[}-@var{n}@r{]} -fdump-tree-optimized@r{[}-@var{n}@r{]} @gol
 -fdump-tree-inlined@r{[}-@var{n}@r{]} @gol
 -fdump-tree-cfg -fdump-tree-dot @gol
--fdump-tree-ssa@r{[}-@var{n}@r{]} -fdump-tree-ssapre@r{[}-@var{n}@r{]} @gol
+-fdump-tree-ssa@r{[}-@var{n}@r{]} -fdump-tree-pre@r{[}-@var{n}@r{]} @gol
+-fdump-tree-ccp@r{[}-@var{n}@r{]} -fdump-tree-dce@r{[}-@var{n}@r{]} @gol
 -fdump-tree-simple@r{[}-raw@r{]} @gol
 -fmem-report @gol
 -fprofile-arcs  -ftest-coverage  -ftime-report @gol
@@ -289,7 +290,7 @@ in the following sections.
 -fsingle-precision-constant  -fssa -fssa-ccp -fssa-dce @gol
 -fstrength-reduce  -fstrict-aliasing  -ftracer -fthread-jumps @gol
 -ftrapv -funroll-all-loops  -funroll-loops  @gol
--ftree-ssa  -fdisable-simple  -funroll-all-loops  -funroll-loops  @gol
+-fdisable-simple  -funroll-all-loops  -funroll-loops  @gol
 -ftree-pre -ftree-ccp  -ftree-dce @gol
 --param @var{name}=@var{value}
 -O  -O0  -O1  -O2  -O3  -Os}
@@ -3156,9 +3157,7 @@ Print the list of reaching definitions f
 @item raw
 Print a raw representation of the tree.
 @item details
-Dump detailed information about the simplification process.  Each statement
-is printed before and after simplification (only used with
--fdump-tree-simple).
+Enable more detailed dumps (not honored by every dump option).
 @item all
 Turn on all options.
 @end table
@@ -3175,6 +3174,11 @@ Dump after all tree based optimization, 
 @item inlined
 Dump after function inlining, to @file{@var{file}.inlined}.
 
+@item simple
+@opindex fdump-tree-simple
+Dump each function before and after the simplification pass to a file.  The
+file name is made by appending @file{.simple} to the source file name.
+
 @item cfg
 @opindex fdump-tree-cfg
 Dump the control flow graph of each function to a file.  The file name is
@@ -3190,16 +3194,16 @@ file name is made by appending @file{.do
 Dump SSA related information to a file.  The file name is made by appending
 @file{.ssa} to the source file name.
 
-@item ssapre
-@opindex fdump-tree-ssapre
+@item ccp
+@opindex fdump-tree-ccp
+Dump each function before and after CCP.  The file name is made by appending
+@file{.ccp} to the source file name.
+
+@item pre
+@opindex fdump-tree-pre
 Dump trees after partial redundancy elimination.  The file name is made
 by appending @file{.pre} to the source file name.
 
-@item simple
-@opindex fdump-tree-simple
-Dump each function before and after the simplification pass to a file.  The
-file name is made by appending @file{.simple} to the source file name.
-
 @item dce
 @opindex fdump-tree-dce
 Dump each function before and after DCE.  The file name is made by appending
@@ -3208,9 +3212,7 @@ Dump each function before and after DCE.
 
 @item -fdump-tree-all-ssa @r{(C and C++ only)}
 @opindex fdump-tree-all-ssa @r{(C and C++ only)}
-Enable all SSA-related dumps described above.  This currently includes
-@samp{original}, @samp{optimized}, @samp{cfg}, @samp{dot},
-@samp{ssapre}, @samp{ccp}, @samp{ssa} and @samp{simple}.
+Enable all SSA-related dumps described above.
 
 @item -save-temps
 @opindex save-temps
@@ -3804,24 +3806,23 @@ those which have no call-preserved regis
 For all machines, optimization level 2 and higher enables this flag by
 default.
 
-@item -ftree-ssa
-Enable optimizations on the tree representation based on the Static
-Single Assignment form (SSA). @emph{Note:} This feature is under
-development and should not be used in this version of GCC.
-
 @item -fdisable-simple
 Do not re-write trees into SIMPLE form.  This switch also disables
-tree-based optimizations (See @option{-ftree-ssa}).  @emph{Note:} This
-option is only useful when debugging the tree simplification pass in GCC.
+tree-based optimizations.  @emph{Note:} This option is only useful when
+debugging the tree simplification pass in GCC.
 
 @item -ftree-pre
-Perform Partial Redundancy Elimination (PRE) on trees.
+Perform Partial Redundancy Elimination (PRE) on trees.  @emph{Note:} This
+feature is under development and should not be used in this version of GCC.
 
 @item -ftree-ccp
 Perform sparse conditional constant propagation (CCP) on trees.
+@emph{Note:} This feature is under development and should not be used in
+this version of GCC.
 
 @item -ftree-dce
-Perform dead code elimination (DCE) on trees.
+Perform dead code elimination (DCE) on trees.  @emph{Note:} This feature is
+under development and should not be used in this version of GCC.
 
 @item -ftracer
 @opindex ftracer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]