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] Loop optimizer skeleton


Hello,

this patch makes flow_loops_find work on tree-ssa again. It also adds
all the neccessary bits for a loop optimizer pass (currently does
nothing except for finding the loops and forgetting them again).  

Bootstrapped & regtested on i686.

Zdenek

	* tree-ssa-loop.c: New.
	* Makefile.in (tree-ssa-loop.o): New.
	* common.opt (ftree-loop-optimize): Add.
	* flags.h (flag_tree_loop): Declare.
	* opts.c (decode_options): Enable flag_tree_loop at -O1.
	(common_handle_option): Handle OPT_ftree_loop_optimize.
	* timevar.def (TV_TREE_LOOP): New.
	* toplev.c (flag_tree_loop): New.
	(f_options): Add -ftree-loop-optimize.
	* tree-cfg.c (build_tree_cfg): Remove disabled loop optimizer
	initialization.
	(tree_make_forwarder_block): Update phi nodes.
	(tree_loop_optimizer_init): Don't call force_single_succ_latches.
	(tree_try_redirect_by_replacing_jump): Comment fix.
	* tree-dump.c (dump_files): Add .loop dump.
	* tree-flow.h (tree_ssa_loop_opt): Declare.
	* tree-optimize.c (optimize_function_tree): Call tree_ssa_loop_opt.
	* tree.h (enum tree_dump_index): Add TDI_loop.
	* doc/invoke.texi (-fdump-tree-loop, -ftree-loop-optimize): Document.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.903.2.146
diff -c -3 -p -r1.903.2.146 Makefile.in
*** Makefile.in	30 Nov 2003 12:54:40 -0000	1.903.2.146
--- Makefile.in	30 Nov 2003 19:48:46 -0000
*************** OBJS-common = \
*** 878,884 ****
   tree-alias-common.o tree-ssa-ccp.o tree-browser.o @ANDER@ tree-ssa-dce.o  \
   tree-ssa-pre.o tree-ssa-live.o tree-must-alias.o	   		   \
   tree-ssa-dom.o domwalk.o tree-tailcall.o gimple-low.o tree-iterator.o	   \
!  tree-ssanames.o tree-sra.o						   \
   alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o	  	   \
   cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o		   \
   cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o	   \
--- 878,884 ----
   tree-alias-common.o tree-ssa-ccp.o tree-browser.o @ANDER@ tree-ssa-dce.o  \
   tree-ssa-pre.o tree-ssa-live.o tree-must-alias.o	   		   \
   tree-ssa-dom.o domwalk.o tree-tailcall.o gimple-low.o tree-iterator.o	   \
!  tree-ssanames.o tree-sra.o tree-ssa-loop.o				   \
   alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o	  	   \
   cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o		   \
   cfgloopanal.o cfgloopmanip.o loop-init.o loop-unswitch.o loop-unroll.o	   \
*************** tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $
*** 1587,1592 ****
--- 1587,1595 ----
  tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
     $(RTL_H) $(TREE_H) $(TM_H) flags.h function.h except.h langhooks.h \
     $(GGC_H) gt-tree-eh.h
+ tree-ssa-loop.o : tree-ssa-loop.c $(TREE_FLOW_H) $(CONFIG_H) \
+    $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) \
+    output.h diagnostic.h $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H)
  tree-optimize.o : tree-optimize.c $(TREE_FLOW_H) $(CONFIG_H) \
     $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) \
     $(GGC_H) output.h diagnostic.h errors.h flags.h tree-alias-common.h \
Index: common.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/common.opt,v
retrieving revision 1.14.2.12
diff -c -3 -p -r1.14.2.12 common.opt
*** common.opt	25 Nov 2003 02:09:34 -0000	1.14.2.12
--- common.opt	30 Nov 2003 19:48:46 -0000
*************** ftree-dominator-opts
*** 715,720 ****
--- 715,724 ----
  Common
  Enable dominator optimizations
  
+ ftree-loop-optimize
+ Common
+ Enable loop optimizations on trees
+ 
  ftree-must-alias
  Common
  Detect must-alias relations to remove pointer de-references
Index: flags.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flags.h,v
retrieving revision 1.86.2.40
diff -c -3 -p -r1.86.2.40 flags.h
*** flags.h	20 Nov 2003 20:54:38 -0000	1.86.2.40
--- flags.h	30 Nov 2003 19:48:46 -0000
*************** extern int flag_tree_dom;
*** 737,742 ****
--- 737,745 ----
  /* Enable promotion of virtual to real operands in must-alias situations.  */
  extern int flag_tree_must_alias;
  
+ /* Enable loop optimization on tree-ssa.  */
+ extern int flag_tree_loop;
+ 
  /* Enable scalar replacement of aggregates.  */
  extern int flag_tree_sra;
  
Index: opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.c,v
retrieving revision 1.31.2.20
diff -c -3 -p -r1.31.2.20 opts.c
*** opts.c	25 Nov 2003 02:09:50 -0000	1.31.2.20
--- opts.c	30 Nov 2003 19:48:46 -0000
*************** decode_options (unsigned int argc, const
*** 535,540 ****
--- 535,541 ----
        flag_tree_ccp = 1;
        flag_tree_dce = 1;
        flag_tree_dom = 1;
+       flag_tree_loop = 1;
        flag_tree_must_alias = 1;
        flag_tree_pre = 1;
        flag_tree_ter = 1;
*************** common_handle_option (size_t scode, cons
*** 1415,1420 ****
--- 1416,1425 ----
  
      case OPT_ftree_must_alias:
        flag_tree_must_alias = value;
+       break;
+ 
+     case OPT_ftree_loop_optimize:
+       flag_tree_loop = value;
        break;
  
      case OPT_ftree_sra:
Index: timevar.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/timevar.def,v
retrieving revision 1.14.2.24
diff -c -3 -p -r1.14.2.24 timevar.def
*** timevar.def	25 Nov 2003 02:09:53 -0000	1.14.2.24
--- timevar.def	30 Nov 2003 19:48:46 -0000
*************** DEFTIMEVAR (TV_TREE_SRA              , "
*** 76,81 ****
--- 76,82 ----
  DEFTIMEVAR (TV_TREE_CCP		     , "tree CCP")
  DEFTIMEVAR (TV_TREE_PRE		     , "tree PRE")
  DEFTIMEVAR (TV_TREE_DCE		     , "tree DCE")
+ DEFTIMEVAR (TV_TREE_LOOP	     , "tree loop optimization")
  DEFTIMEVAR (TV_TREE_SSA_TO_NORMAL    , "tree SSA to normal")
  DEFTIMEVAR (TV_DOM_FRONTIERS         , "dominance frontiers")
  DEFTIMEVAR (TV_OVERLOAD              , "overload resolution")
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.654.2.81
diff -c -3 -p -r1.654.2.81 toplev.c
*** toplev.c	29 Nov 2003 12:43:09 -0000	1.654.2.81
--- toplev.c	30 Nov 2003 19:48:46 -0000
*************** int flag_tree_dce = 0;
*** 980,985 ****
--- 980,988 ----
  /* Enable promotion of virtual to real operands in must-alias situations.  */
  int flag_tree_must_alias = 0;
  
+ /* Enable loop optimization on tree-ssa.  */
+ int flag_tree_loop = 0;
+ 
  /* Enable scalar replacement of aggregates.  */
  int flag_tree_sra = 0;
  
*************** static const lang_independent_options f_
*** 1189,1195 ****
    { "tree-dominator-opts", &flag_tree_dom, 1 },
    { "tree-combine-temps", &flag_tree_combine_temps, 1 },
    { "tree-ter", &flag_tree_ter, 1 },
!   { "tree-must-alias", &flag_tree_must_alias, 1 }
  };
  
  /* Here is a table, controlled by the tm.h file, listing each -m switch
--- 1192,1199 ----
    { "tree-dominator-opts", &flag_tree_dom, 1 },
    { "tree-combine-temps", &flag_tree_combine_temps, 1 },
    { "tree-ter", &flag_tree_ter, 1 },
!   { "tree-must-alias", &flag_tree_must_alias, 1 },
!   { "tree-loop-optimize", &flag_tree_loop, 1 }
  };
  
  /* Here is a table, controlled by the tm.h file, listing each -m switch
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.225
diff -c -3 -p -r1.1.4.225 tree-cfg.c
*** tree-cfg.c	25 Nov 2003 05:09:07 -0000	1.1.4.225
--- tree-cfg.c	30 Nov 2003 19:48:46 -0000
*************** build_tree_cfg (tree *fnbody)
*** 184,205 ****
        make_edges ();
      }
  
- #if 0
-   {
-     /* The loop analyzer should be initialized right after the CFG
-        construction because some loops will need latch blocks, and these
-        need to be added before we do anything else.  If you use this
-        structure you'll have to ensure that optimizers don't invalidate the
-        information gathered in the loops structure via modifications to the
-        underlying structure: the CFG.  */
-     struct loops *loops = loop_optimizer_init (NULL);
- 
-     /* Once initialized, it's not really necessary to keep the loop data
-        structures around.  They may be rescanned using flow_loops_find.  */
-     loop_optimizer_finalize (loops, NULL);
-   }
- #endif
- 
    timevar_pop (TV_TREE_CFG);
  
    /* Debugging dumps.  */
--- 184,189 ----
*************** static basic_block
*** 3170,3179 ****
  tree_make_forwarder_block (basic_block bb, int redirect_latch,
                             int redirect_nonlatch, edge except, int conn_latch)
  {
!   edge e, next_e, fallthru;
    basic_block dummy;
  
-   /* Create the new basic block.  */
    dummy = create_bb (NULL, bb->prev_bb);
    create_block_annotation (dummy);
    dummy->count = bb->count;
--- 3154,3165 ----
  tree_make_forwarder_block (basic_block bb, int redirect_latch,
                             int redirect_nonlatch, edge except, int conn_latch)
  {
!   edge e, next_e, new_e, fallthru;
    basic_block dummy;
+   tree phi, new_phi, var, label;
+   bool first;
+   block_stmt_iterator bsi, bsi_tgt;
  
    dummy = create_bb (NULL, bb->prev_bb);
    create_block_annotation (dummy);
    dummy->count = bb->count;
*************** tree_make_forwarder_block (basic_block b
*** 3186,3211 ****
    for (e = dummy->pred; e; e = e->pred_next)
      e->dest = dummy;
  
    fallthru = make_edge (dummy, bb, EDGE_FALLTHRU);
  
    HEADER_BLOCK (dummy) = 0;
    HEADER_BLOCK (bb) = 1;
  
    /* Redirect back edges we want to keep.  */
    for (e = dummy->pred; e; e = next_e)
      {
        next_e = e->pred_next;
!       if (e == except
! 	  || !((redirect_latch && LATCH_EDGE (e))
! 	       || (redirect_nonlatch && !LATCH_EDGE (e))))
! 	{
! 	  dummy->frequency -= EDGE_FREQUENCY (e);
! 	  dummy->count -= e->count;
! 	  if (dummy->frequency < 0)
! 	    dummy->frequency = 0;
! 	  if (dummy->count < 0)
! 	    dummy->count = 0;
! 	  redirect_edge_succ (e, bb);
  	}
      }
  
--- 3172,3247 ----
    for (e = dummy->pred; e; e = e->pred_next)
      e->dest = dummy;
  
+   /* Move the phi nodes to the dummy block.  */
+   bb_ann (dummy)->phi_nodes = bb_ann (bb)->phi_nodes;
+   bb_ann (bb)->phi_nodes = NULL;
+   for (phi = phi_nodes (dummy); phi; phi = TREE_CHAIN (phi))
+     set_bb_for_stmt (phi, dummy);
+ 
+   /* Move the labels to the new basic block.  */
+   for (bsi = bsi_start (bb), bsi_tgt = bsi_start (dummy); !bsi_end_p (bsi); )
+     {
+       label = bsi_stmt (bsi);
+       if (TREE_CODE (label) != LABEL_EXPR)
+ 	break;
+ 
+       bsi_remove (&bsi);
+       bsi_insert_after (&bsi_tgt, label, BSI_NEW_STMT);
+     }
+ 
    fallthru = make_edge (dummy, bb, EDGE_FALLTHRU);
  
+   alloc_aux_for_block (dummy, sizeof (int));
    HEADER_BLOCK (dummy) = 0;
    HEADER_BLOCK (bb) = 1;
  
+   first = true;
+ 
    /* Redirect back edges we want to keep.  */
    for (e = dummy->pred; e; e = next_e)
      {
        next_e = e->pred_next;
!       if (e != except
! 	  && ((redirect_latch && LATCH_EDGE (e))
! 	      || (redirect_nonlatch && !LATCH_EDGE (e))))
! 	continue;
! 
!       dummy->frequency -= EDGE_FREQUENCY (e);
!       dummy->count -= e->count;
!       if (dummy->frequency < 0)
! 	dummy->frequency = 0;
!       if (dummy->count < 0)
! 	dummy->count = 0;
! 
!       new_e = tree_redirect_edge_and_branch_1 (e, bb, true);
! 
!       if (first)
! 	{
! 	  first = false;
! 
! 	  /* The first time we redirect a branch we must create new phi nodes
! 	     on the start of bb.  */
! 	  for (phi = phi_nodes (dummy); phi; phi = TREE_CHAIN (phi))
! 	    {
! 	      var = PHI_RESULT (phi);
! 	      new_phi = create_phi_node (var, bb);
! 	      SSA_NAME_DEF_STMT (var) = new_phi;
! 	      PHI_RESULT (phi) = make_ssa_name (SSA_NAME_VAR (var), phi);
! 	      add_phi_arg (&new_phi, PHI_RESULT (phi), fallthru);
! 	    }
! 
! 	  /* Ensure that the phi node chains are in the same order.  */
! 	  bb_ann (bb)->phi_nodes = nreverse (phi_nodes (bb));
! 	}
! 
!       /* Move the argument of the phi node.  */
!       for (phi = phi_nodes (dummy), new_phi = phi_nodes (bb);
! 	   phi;
! 	   phi = TREE_CHAIN (phi), new_phi = TREE_CHAIN (new_phi))
! 	{
! 	  var = PHI_ARG_DEF (phi, phi_arg_from_edge (phi, e));
! 	  add_phi_arg (&new_phi, var, new_e);
! 	  remove_phi_arg (phi, e->src);
  	}
      }
  
*************** tree_loop_optimizer_init (FILE *dumpfile
*** 3245,3252 ****
--- 3281,3292 ----
    free (loops->cfg.dfs_order);
    loops->cfg.dfs_order = NULL;
  
+ #if 0
+   /* Does not work just now.  It will be easier to fix it in the no-gotos
+      form.  */
    /* Force all latches to have only single successor.  */
    force_single_succ_latches (loops);
+ #endif
  
    /* Mark irreducible loops.  */
    mark_irreducible_loops (loops);
*************** tree_try_redirect_by_replacing_jump (edg
*** 3558,3564 ****
  }
  
  /* Redirect E to DEST.  Return NULL on failure, edge representing redirected
!    branch otherwise  */
  
  static edge
  tree_redirect_edge_and_branch_1 (edge e, basic_block dest, bool splitting)
--- 3598,3604 ----
  }
  
  /* Redirect E to DEST.  Return NULL on failure, edge representing redirected
!    branch otherwise.  */
  
  static edge
  tree_redirect_edge_and_branch_1 (edge e, basic_block dest, bool splitting)
Index: tree-dump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-dump.c,v
retrieving revision 1.6.2.55
diff -c -3 -p -r1.6.2.55 tree-dump.c
*** tree-dump.c	20 Nov 2003 20:54:39 -0000	1.6.2.55
--- tree-dump.c	30 Nov 2003 19:48:46 -0000
*************** static struct dump_file_info dump_files[
*** 664,669 ****
--- 664,670 ----
    {".dom1", "tree-dom1", 0, 0},
    {".ssa2", "tree-ssa2", 0, 0},
    {".dce1", "tree-dce1", 0, 0},
+   {".loop", "tree-loop", 0, 0},
    {".tail", "tree-tail", 0, 0},
    {".mustalias", "tree-mustalias", 0, 0},
    {".ssa3", "tree-ssa3", 0, 0},
Index: tree-flow.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-flow.h,v
retrieving revision 1.1.4.160
diff -c -3 -p -r1.1.4.160 tree-flow.h
*** tree-flow.h	25 Nov 2003 05:09:08 -0000	1.1.4.160
--- tree-flow.h	30 Nov 2003 19:48:46 -0000
*************** extern void propagate_copy (tree *, tree
*** 533,538 ****
--- 533,540 ----
  /* In tree-ssa-dce.c  */
  void tree_ssa_dce (tree, enum tree_dump_index);
  
+ /* In tree-ssa-loop.c  */
+ void tree_ssa_loop_opt (tree, enum tree_dump_index);
  
  /* In tree-flow-inline.h  */
  static inline int phi_arg_from_edge (tree, edge);
Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 1.1.4.80
diff -c -3 -p -r1.1.4.80 tree-optimize.c
*** tree-optimize.c	29 Nov 2003 12:43:10 -0000	1.1.4.80
--- tree-optimize.c	30 Nov 2003 19:48:46 -0000
*************** optimize_function_tree (tree fndecl, tre
*** 117,122 ****
--- 117,125 ----
        if (flag_tree_dce)
  	tree_ssa_dce (fndecl, TDI_dce_1);
  
+       if (flag_tree_loop)
+ 	tree_ssa_loop_opt (fndecl, TDI_loop);
+ 
  #if 0
        /* Eliminate tail recursion calls.  */
        tree_optimize_tail_calls (false, TDI_tail1);
Index: tree-ssa-loop.c
===================================================================
RCS file: tree-ssa-loop.c
diff -N tree-ssa-loop.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- tree-ssa-loop.c	30 Nov 2003 19:48:46 -0000
***************
*** 0 ****
--- 1,68 ----
+ /* Loop optimizations over tree-ssa.
+    Copyright (C) 2003 Free Software Foundation, Inc.
+    
+ This file is part of GCC.
+    
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+    
+ GCC is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ for more details.
+    
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING.  If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.  */
+ 
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "tm.h"
+ #include "tree.h"
+ #include "rtl.h"
+ #include "tm_p.h"
+ #include "hard-reg-set.h"
+ #include "basic-block.h"
+ #include "output.h"
+ #include "diagnostic.h"
+ #include "basic-block.h"
+ #include "tree-flow.h"
+ #include "tree-dump.h"
+ #include "timevar.h"
+ 
+ /* Dump file and flags.  */
+ static FILE *dump_file;
+ static int dump_flags;
+ 
+ /* The main entry into loop optimization pass.  PHASE indicates which dump file
+    from the DUMP_FILES array to use when dumping debugging information.
+    FNDECL is the current function decl.  */
+ 
+ void
+ tree_ssa_loop_opt (tree fndecl, enum tree_dump_index phase)
+ {
+ #ifdef ENABLE_CHECKING
+   struct loops *loops;
+ 
+   /* Does nothing for now except for checking that we are able to build the
+      loops.  */
+ 
+   dump_file = dump_begin (phase, &dump_flags);
+ 
+   timevar_push (TV_TREE_LOOP);
+   loops = loop_optimizer_init (dump_file);
+   loop_optimizer_finalize (loops,
+ 			   (dump_flags & TDF_DETAILS) ? dump_file : NULL);
+   timevar_pop (TV_TREE_LOOP);
+ 
+   if (dump_file)
+     {
+       dump_function_to_file (fndecl, dump_file, dump_flags);
+       dump_end (phase, dump_file);
+     }
+ #endif
+ }
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.342.2.141
diff -c -3 -p -r1.342.2.141 tree.h
*** tree.h	27 Nov 2003 04:01:03 -0000	1.342.2.141
--- tree.h	30 Nov 2003 19:48:46 -0000
*************** enum tree_dump_index
*** 3581,3586 ****
--- 3581,3587 ----
    TDI_dom_1,
    TDI_ssa_2,
    TDI_dce_1,
+   TDI_loop,
    TDI_tail,			/* dump after tail recursion elimination  */
    TDI_mustalias,
    TDI_ssa_3,
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.152.2.61
diff -c -3 -p -r1.152.2.61 invoke.texi
*** doc/invoke.texi	25 Nov 2003 02:10:57 -0000	1.152.2.61
--- doc/invoke.texi	30 Nov 2003 19:48:46 -0000
*************** in the following sections.
*** 255,261 ****
  -fdump-tree-ccp@r{[}-@var{n}@r{]} -fdump-tree-dce@r{[}-@var{n}@r{]} @gol
  -fdump-tree-gimple@r{[}-raw@r{]} -fdump-tree-mudflap@r{[}-@var{n}@r{]} @gol
  -fdump-tree-must-alias@r{[}-@var{n}@r{]} -fdump-tree-dom@r{[}-@var{n}@r{]}@gol
! -fdump-tree-sra@r{[}-@var{n}@r{]}
  -feliminate-dwarf2-dups -feliminate-unused-debug-types @gol
  -feliminate-unused-debug-symbols -fmem-report -fprofile-arcs @gol
  -frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
--- 255,261 ----
  -fdump-tree-ccp@r{[}-@var{n}@r{]} -fdump-tree-dce@r{[}-@var{n}@r{]} @gol
  -fdump-tree-gimple@r{[}-raw@r{]} -fdump-tree-mudflap@r{[}-@var{n}@r{]} @gol
  -fdump-tree-must-alias@r{[}-@var{n}@r{]} -fdump-tree-dom@r{[}-@var{n}@r{]}@gol
! -fdump-tree-loop@r{[}-@var{n}@r{]} -fdump-tree-sra@r{[}-@var{n}@r{]} @gol
  -feliminate-dwarf2-dups -feliminate-unused-debug-types @gol
  -feliminate-unused-debug-symbols -fmem-report -fprofile-arcs @gol
  -frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
*************** in the following sections.
*** 305,311 ****
  -funswitch-loops  -fold-unroll-loops  -fold-unroll-all-loops @gol
  -ftree-pre  -ftree-ccp  -ftree-dce  -ftree-copyprop  @gol
  -fdisable-tree-ssa -ftree-dominator-opts -ftree-must-alias @gol
! -ftree-sra @gol
  --param @var{name}=@var{value}
  -O  -O0  -O1  -O2  -O3  -Os}
  
--- 305,311 ----
  -funswitch-loops  -fold-unroll-loops  -fold-unroll-all-loops @gol
  -ftree-pre  -ftree-ccp  -ftree-dce  -ftree-copyprop  @gol
  -fdisable-tree-ssa -ftree-dominator-opts -ftree-must-alias @gol
! -ftree-loop-optimize -ftree-sra @gol
  --param @var{name}=@var{value}
  -O  -O0  -O1  -O2  -O3  -Os}
  
*************** file name is made by appending @file{.sr
*** 3573,3578 ****
--- 3573,3583 ----
  Dump each function after applying dominator tree optimizations.  The file
  name is made by appending @file{.dom} to the source file name.
  
+ @item loop
+ @opindex fdump-tree-loop
+ Dump each function after applying tree-level loop optimizations.  The file
+ name is made by appending @file{.loop} to the source file name.
+ 
  @item all
  @opindex fdump-tree-all
  Enable all the available tree dumps with the flags provided in this option.
*************** default at -O and higher.
*** 4321,4326 ****
--- 4326,4335 ----
  
  @item -ftree-dominator-opts
  Perform dead code elimination (DCE) on trees.  This flag is enabled by
+ default at -O and higher.
+ 
+ @item -ftree-loop-optimize
+ Perform loop optimization on trees.  This flag is enabled by
  default at -O and higher.
  
  @item -ftree-must-alias


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