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] Move DOM out of tree-ssa.c


This started as a cleanup patch to fix three problems:

     1. The dominator pass was being called from within the main SSA
        rename pass.  So, every pass that needed to call the SSA renamer
        more than once was forced to run DOM.
     2. The sequencing of dump files was not consistent.  For instance,
        the .ssa dump would contain debugging information from the DOM
        pass.  Passes that were being called more than once (e.g., DCE)
        would always dump to the same file.
     3. With some other changes I have in my tree, we are going to
        expose symbols in the CCP pass.  In CCP we are now propagating
        address constants into INDIRECT_REF expressions.  We need to
        call the SSA renamer after CCP.

I re-arranged the SSA renamer, so that it doesn't call DOM and made DOM
another pass that is called from optimize_function_tree.  We now have a
generic way of dealing with passes that may need to re-run SSA on some
symbols.  Passes that may expose symbols, add them to a bitmap.  On
return from the pass, optimize_function_tree will then call into the SSA
renamer with those symbols.

Since we now have a more modular DOM pass, I experimented a little bit
with the ordering in optimize_function_tree.  I found that this ordering
seems to produce better code and saves on compilation time:

DOM -> DCE -> MUST-ALIAS -> CCP -> PRE -> DOM -> COPYPROP -> DCE

I experimented with the .i/.ii files from a compiler+libraries bootstrap
cycle.  With this ordering, the tree passes are 5% faster and we have
some very minor code size savings (0.1% looking at the .optimized
dumps).

We now have a proper sequencing for the tree dump files.  Each repeated
pass will go to a different file.  All the dumps are numbered in the
same sequence as executed by optimize_function_tree.  Adding or
re-ordering passes requires editing of the TDI arrays, but it shouldn't
be too bad.

In the process of re-ordering the passes I found a few other things. 
Some of the testsuite tweaks I had to do are because now we generate
slightly better code in those cases.

     1. DCE was computing dominators and not using the information at
        all.
     2. DOM needs to call cleanup_tree_cfg while iterating.  This showed
        up as a regression in gcc.c-torture/compile/20011114-3.c,
        gcc.c-torture/execute/20000403-1.c,
        gcc.c-torture/execute/20011008-3.c and
        gcc.c-torture/execute/20000801-2.c.
     3. PRE was not calling get_stmt_operands() when initially adding
        expressions to process.  This showed up as a bootstrap problem
        after I moved PRE after CCP.
     4. thread_edge was not removing EDGE_FALLTHRU from edges out of
        blocks ending in GOTO_EXPR.  This was triggering an abort in
        bsi_insert_on_edge_immediate().  Test case
        gcc.dg/tree-ssa/20030920-1.c checks for this.
     5. In gcc.dg/tree-ssa/20030703-2.c we should only be looking for on
        IF at the end.  If 'tree_code_type[t->code]' is zero, then the
        third if() conditional is unnecessary.  That should cause the
        call to abort() to be removed, which in turn causes the whole
        second if() to disappear.
     6. In gcc.dg/tree-ssa/20030807-1.c the inner conditionals are dead,
        so we should only expect 1 conditional.
     7. In gcc.dg/tree-ssa/20030807-5.c, I added a 'return 1' to avoid
        DCE killing the whole body of the function (it's all dead code,
        otherwise).  With that return, we should expect 2 IFs.
     8. Added an explanation to gcc.dg/tree-ssa/20030807-7.c to describe
        why we can't optimize that case without PTA.
     9. The remaining changes to gcc.dg/tree-ssa are just tweaks to
        account for the new dump file names.


Bootstrapped and tested on x86, amd64 and ia64 (well, C++ libraries are
broken on ia64, but at least I could check that we can bootstrap the
compiler)


	* tree-dfa.c (compute_alias_sets): Use TDI_alias instead of
	TDI_ssa.
	* tree-dump.c (dump_files): Add enties for TDI_alias, TDI_ssa1,
	TDI_dom1, TDI_ssa2, TDI_dce1, TDI_ssa3, TDI_dom2, TDI_ssa4,
	TDI_ssa5 and TDI_dce2.
	Remove entries for TDI_ssa, TDI_dom and TDI_dce.
	* tree.h (enum tree_dump_index): Similarly.
	(TDF_ALIAS): Remove.
	(TDF_VOPS): Change value.
	* doc/invoke.texi (-fdump-tree-alias): Document.
	* tree-flow.h (tree_warn_uninitialized): Remove unused variable.
	(rewrite_into_ssa): Add enum tree_dump_index argument.  Update all
	callers.
	(rewrite_out_of_ssa): Likewise.
	(tree_perform_ssa_pre): Likewise.
	(tree_ssa_dominator_optimize): Likewise.
	(tree_ssa_dce): Likewise.
	(tree_ssa_copyprop): Likewise.
	(tree_ssa_ccp): Likewise.
	Add sbitmap argument.
	(tree_compute_must_alias): Likewise.
	(mark_new_vars_to_rename): Declare.
	* tree-must-alias.c (tree_compute_must_alias): Do not call
	rewrite_into_ssa.
	Remove local vars_to_rename.  Use new argument instead.
	* tree-optimize.c (optimize_function_tree): Re-write optimization
	ordering to support passes that need the SSA form updated.
	Call tree_ssa_dominator_optimize.
	Re-arrange optimization ordering.
	* tree-ssa-ccp.c (substitute_and_fold): Take new argument
	vars_to_rename.
	Call mark_new_vars_to_rename.
	(visit_phi_node): Move variable 'val' into the right scope.
	(initialize): Move call dump_begin ...
	(tree_ssa_ccp): ... here.
	* tree-ssa-dom.c (mark_new_vars_to_rename): Declare extern.
	Make sure that variables in virtual operands aren't marked
	unnecessarily.
	* tree-ssa.c (rewrite_into_ssa): Do not call
	tree_ssa_dominator_optimize.


	* tree-ssa-dce.c (dom_info): Remove unused variable.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): If the CFG has been
	altered, call cleanup_tree_cfg.
	Call cleanup_tree_cfg before returning.
	* tree-ssa-pre.c (tree_perform_ssapre): Call get_stmt_operands
	before processing the statement.
	* tree-ssa-dom.c (thread_edge): Remove attribute EDGE_FALLTHRU from
	edge.

testsuite/ChangeLog.tree-ssa


	* gcc.dg/tree-ssa/20030920-1.c: New test.


	* gcc.dg/tree-ssa/20030703-2.c: Expect one if() conditional after
	the second dominator pass.
	* gcc.dg/tree-ssa/20030807-1.c: Likewise.
	* gcc.dg/tree-ssa/20030807-1.c: Add return statement to avoid DCE
	removing the whole body.
	Expect two if() statements after the second dominator pass.
	* gcc.dg/tree-ssa/20030807-7.c: Explain why we fail to optimize.


	* gcc.dg/tree-ssa/20030530-2.c: Adjust to use -fdump-tree-dom2.
	* gcc.dg/tree-ssa/20030611-1.c: Likewise.
	* gcc.dg/tree-ssa/20030703-1.c: Likewise
	* gcc.dg/tree-ssa/20030703-2.c: Likewise.
	* gcc.dg/tree-ssa/20030708-1.c: Likewise.
	* gcc.dg/tree-ssa/20030709-2.c: Likewise.
	* gcc.dg/tree-ssa/20030709-3.c: Likewise.
	* gcc.dg/tree-ssa/20030710-1.c: Likewise.
	* gcc.dg/tree-ssa/20030711-1.c: Likewise.
	* gcc.dg/tree-ssa/20030711-2.c: Likewise.
	* gcc.dg/tree-ssa/20030711-3.c: Likewise.
	* gcc.dg/tree-ssa/20030714-1.c: Likewise.
	* gcc.dg/tree-ssa/20030714-2.c: Likewise.
	* gcc.dg/tree-ssa/20030729-1.c: Likewise.
	* gcc.dg/tree-ssa/20030730-1.c: Likewise.
	* gcc.dg/tree-ssa/20030730-2.c: Likewise.
	* gcc.dg/tree-ssa/20030731-1.c: Likewise.
	* gcc.dg/tree-ssa/20030807-1.c: Likewise.
	* gcc.dg/tree-ssa/20030807-10.c: Likewise.
	* gcc.dg/tree-ssa/20030807-11.c: Likewise.
	* gcc.dg/tree-ssa/20030807-2.c: Likewise.
	* gcc.dg/tree-ssa/20030807-3.c: Likewise.
	* gcc.dg/tree-ssa/20030807-4.c: Likewise.
	* gcc.dg/tree-ssa/20030807-5.c: Likewise.
	* gcc.dg/tree-ssa/20030807-6.c: Likewise.
	* gcc.dg/tree-ssa/20030807-7.c: Likewise.
	* gcc.dg/tree-ssa/20030807-8.c: Likewise.
	* gcc.dg/tree-ssa/20030807-9.c: Likewise.
	* gcc.dg/tree-ssa/20030808-1.c: Likewise.
	* gcc.dg/tree-ssa/20030814-1.c: Likewise.
	* gcc.dg/tree-ssa/20030814-2.c: Likewise.
	* gcc.dg/tree-ssa/20030814-3.c: Likewise.
	* gcc.dg/tree-ssa/20030814-4.c: Likewise.
	* gcc.dg/tree-ssa/20030814-5.c: Likewise.
	* gcc.dg/tree-ssa/20030814-6.c: Likewise.
	* gcc.dg/tree-ssa/20030814-7.c: Likewise.
	* gcc.dg/tree-ssa/20030815-1.c: Likewise.
	* gcc.dg/tree-ssa/20030824-2.c: Likewise.
	* gcc.dg/tree-ssa/20030907-1.c: Likewise.

Index: tree-dfa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-dfa.c,v
retrieving revision 1.1.4.162
diff -d -c -p -r1.1.4.162 tree-dfa.c
*** tree-dfa.c	20 Sep 2003 12:31:53 -0000	1.1.4.162
--- tree-dfa.c	21 Sep 2003 21:26:56 -0000
*************** compute_alias_sets (void)
*** 2074,2085 ****
        }
  
    /* Debugging dumps.  */
!   dump_file = dump_begin (TDI_ssa, &dump_flags);
!   if (dump_file && dump_flags & TDF_ALIAS)
      {
        dump_alias_info (dump_file);
        dump_referenced_vars (dump_file);
!       dump_end (TDI_ssa, dump_file);
      }
  }
  
--- 2074,2085 ----
        }
  
    /* Debugging dumps.  */
!   dump_file = dump_begin (TDI_alias, &dump_flags);
!   if (dump_file)
      {
        dump_alias_info (dump_file);
        dump_referenced_vars (dump_file);
!       dump_end (TDI_alias, dump_file);
      }
  }
  
Index: tree-dump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-dump.c,v
retrieving revision 1.6.2.39
diff -d -c -p -r1.6.2.39 tree-dump.c
*** tree-dump.c	18 Sep 2003 00:19:27 -0000	1.6.2.39
--- tree-dump.c	21 Sep 2003 21:26:56 -0000
*************** static struct dump_file_info dump_files[
*** 656,668 ****
    {".cfg", "tree-cfg", 0, 0},
    {".dot", "tree-dot", 0, 0},
    {".pta", "tree-pta", 0, 0},
!   {".ssa", "tree-ssa", 0, 0},
!   {".dom", "tree-dom", 0, 0},
    {".mustalias", "tree-mustalias", 0, 0},
!   {".pre", "tree-pre", 0, 0},
    {".ccp", "tree-ccp", 0, 0},
    {".copyprop", "tree-copyprop", 0, 0},
!   {".dce", "tree-dce", 0, 0},
    {".optimized", "tree-optimized", 0, 0},
    {".mudflap", "tree-mudflap", 0, 0},
    {".xml", "call-graph", 0, 0},
--- 656,675 ----
    {".cfg", "tree-cfg", 0, 0},
    {".dot", "tree-dot", 0, 0},
    {".pta", "tree-pta", 0, 0},
!   {".alias", "tree-alias", 0, 0},
!   {".ssa1", "tree-ssa1", 0, 0},
!   {".dom1", "tree-dom1", 0, 0},
!   {".ssa2", "tree-ssa2", 0, 0},
!   {".dce1", "tree-dce1", 0, 0},
    {".mustalias", "tree-mustalias", 0, 0},
!   {".ssa3", "tree-ssa3", 0, 0},
    {".ccp", "tree-ccp", 0, 0},
+   {".ssa4", "tree-ssa4", 0, 0},
+   {".pre", "tree-pre", 0, 0},
+   {".dom2", "tree-dom2", 0, 0},
+   {".ssa5", "tree-ssa5", 0, 0},
    {".copyprop", "tree-copyprop", 0, 0},
!   {".dce2", "tree-dce2", 0, 0},
    {".optimized", "tree-optimized", 0, 0},
    {".mudflap", "tree-mudflap", 0, 0},
    {".xml", "call-graph", 0, 0},
*************** static const struct dump_option_value_in
*** 686,692 ****
    {"details", TDF_DETAILS},
    {"stats", TDF_STATS},
    {"blocks", TDF_BLOCKS},
-   {"alias", TDF_ALIAS},
    {"vops", TDF_VOPS},
    {"all", ~(TDF_RAW | TDF_SLIM)},
    {NULL, 0}
--- 693,698 ----
Index: tree-flow.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-flow.h,v
retrieving revision 1.1.4.120
diff -d -c -p -r1.1.4.120 tree-flow.h
*** tree-flow.h	20 Sep 2003 12:31:53 -0000	1.1.4.120
--- tree-flow.h	21 Sep 2003 21:26:56 -0000
*************** void bsi_next_in_bb (block_stmt_iterator
*** 369,377 ****
  /*---------------------------------------------------------------------------
  			      Global declarations
  ---------------------------------------------------------------------------*/
- /* Nonzero to warn about variables used before they are initialized.  */
- extern int tree_warn_uninitialized;
- 
  /* Array of all variables referenced in the function.  */
  extern GTY(()) varray_type referenced_vars;
  
--- 369,374 ----
*************** extern void add_referenced_tmp_var (tree
*** 477,484 ****
  
  /* In tree-ssa.c  */
  extern void init_tree_ssa (void);
! extern void rewrite_into_ssa (tree, sbitmap);
! extern void rewrite_out_of_ssa (tree);
  extern void dump_reaching_defs (FILE *);
  extern void debug_reaching_defs (void);
  extern void dump_tree_ssa (FILE *);
--- 474,481 ----
  
  /* In tree-ssa.c  */
  extern void init_tree_ssa (void);
! extern void rewrite_into_ssa (tree, sbitmap, enum tree_dump_index);
! extern void rewrite_out_of_ssa (tree, enum tree_dump_index);
  extern void dump_reaching_defs (FILE *);
  extern void debug_reaching_defs (void);
  extern void dump_tree_ssa (FILE *);
*************** extern bool tree_ssa_useless_type_conver
*** 492,515 ****
  extern void build_dominator_tree (dominance_info);
  
  /* In tree-ssa-pre.c  */
! extern void tree_perform_ssapre (tree);
  
  /* In tree-ssa-ccp.c  */
! void tree_ssa_ccp (tree);
  bool fold_stmt (tree *);
  tree widen_bitfield (tree, tree, tree);
  
  /* In tree-ssa-dom.c  */
! extern void tree_ssa_dominator_optimize (tree, sbitmap);
  extern void dump_dominator_optimization_stats (FILE *);
  extern void debug_dominator_optimization_stats (void);
  
  /* In tree-ssa-dce.c  */
! void tree_ssa_dce (tree);
  
  
  /* In tree-ssa-copyprop.c  */
! void tree_ssa_copyprop (tree);
  void propagate_copy (tree *, tree, tree);
  void fixup_var_scope (tree, tree);
  
--- 489,513 ----
  extern void build_dominator_tree (dominance_info);
  
  /* In tree-ssa-pre.c  */
! extern void tree_perform_ssapre (tree, enum tree_dump_index);
  
  /* In tree-ssa-ccp.c  */
! void tree_ssa_ccp (tree, sbitmap, enum tree_dump_index);
  bool fold_stmt (tree *);
  tree widen_bitfield (tree, tree, tree);
  
  /* In tree-ssa-dom.c  */
! extern void tree_ssa_dominator_optimize (tree, sbitmap, enum tree_dump_index);
  extern void dump_dominator_optimization_stats (FILE *);
  extern void debug_dominator_optimization_stats (void);
+ extern void mark_new_vars_to_rename (tree, sbitmap);
  
  /* In tree-ssa-dce.c  */
! void tree_ssa_dce (tree, enum tree_dump_index);
  
  
  /* In tree-ssa-copyprop.c  */
! void tree_ssa_copyprop (tree, enum tree_dump_index);
  void propagate_copy (tree *, tree, tree);
  void fixup_var_scope (tree, tree);
  
*************** static inline bool is_unchanging_value (
*** 520,526 ****
  static inline bool may_propagate_copy (tree, tree);
  
  /* In tree-must-alias.c  */
! void tree_compute_must_alias (tree);
  
  /* In tree-eh.c  */
  extern void lower_eh_constructs (tree *);
--- 518,524 ----
  static inline bool may_propagate_copy (tree, tree);
  
  /* In tree-must-alias.c  */
! void tree_compute_must_alias (tree, sbitmap, enum tree_dump_index);
  
  /* In tree-eh.c  */
  extern void lower_eh_constructs (tree *);
Index: tree-must-alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-must-alias.c,v
retrieving revision 1.1.2.3
diff -d -c -p -r1.1.2.3 tree-must-alias.c
*** tree-must-alias.c	13 Sep 2003 20:21:26 -0000	1.1.2.3
--- tree-must-alias.c	21 Sep 2003 21:26:56 -0000
*************** static int dump_flags;
*** 54,74 ****
  
  
  /* This pass finds must-alias relations exposed by constant propagation of
!    ADDR_EXPR values into INDIRECT_REF expressions.  */
  
  void
! tree_compute_must_alias (tree fndecl)
  {
    size_t i;
!   sbitmap addresses_needed, vars_to_rename;
  
    timevar_push (TV_TREE_MUST_ALIAS);
  
    /* Initialize debugging dumps.  */
!   dump_file = dump_begin (TDI_mustalias, &dump_flags);
  
    /* Initialize internal data structures.  */
-   vars_to_rename = sbitmap_alloc (num_referenced_vars);
    sbitmap_zero (vars_to_rename);
  
    addresses_needed = sbitmap_alloc (num_referenced_vars);
--- 54,82 ----
  
  
  /* This pass finds must-alias relations exposed by constant propagation of
!    ADDR_EXPR values into INDIRECT_REF expressions.
!    
!    FNDECL is the function to process.
!    
!    VARS_TO_RENAME will contain the variables that need to be renamed into SSA
!    after this pass is done.
! 
!    PHASE indicates which dump file from the DUMP_FILES array to use when
!    dumping debugging information.  */
  
  void
! tree_compute_must_alias (tree fndecl, sbitmap vars_to_rename,
! 			 enum tree_dump_index phase)
  {
    size_t i;
!   sbitmap addresses_needed;
  
    timevar_push (TV_TREE_MUST_ALIAS);
  
    /* Initialize debugging dumps.  */
!   dump_file = dump_begin (phase, &dump_flags);
  
    /* Initialize internal data structures.  */
    sbitmap_zero (vars_to_rename);
  
    addresses_needed = sbitmap_alloc (num_referenced_vars);
*************** tree_compute_must_alias (tree fndecl)
*** 93,109 ****
  	promote_var (var, vars_to_rename);
      }
  
-   /* Run the SSA pass again if we need to rename new variables.  */
-   if (sbitmap_first_set_bit (vars_to_rename) >= 0)
-     {
-       /* Rename all variables in VARS_TO_RENAME into SSA form.  */
-       remove_all_phi_nodes_for (vars_to_rename);
-       rewrite_into_ssa (fndecl, vars_to_rename);
-     }
- 
    /* Free allocated memory.  */
    sbitmap_free (addresses_needed);
-   sbitmap_free (vars_to_rename);
  
    /* Debugging dumps.  */
    if (dump_file)
--- 101,108 ----
*************** tree_compute_must_alias (tree fndecl)
*** 112,118 ****
  	dump_referenced_vars (dump_file);
  
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (TDI_mustalias, dump_file);
      }
  
    timevar_pop (TV_TREE_MUST_ALIAS);
--- 111,117 ----
  	dump_referenced_vars (dump_file);
  
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (phase, dump_file);
      }
  
    timevar_pop (TV_TREE_MUST_ALIAS);
Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 1.1.4.48
diff -d -c -p -r1.1.4.48 tree-optimize.c
*** tree-optimize.c	18 Sep 2003 00:19:27 -0000	1.1.4.48
--- tree-optimize.c	21 Sep 2003 21:26:56 -0000
*************** optimize_function_tree (tree fndecl)
*** 69,75 ****
      FILE *file = dump_begin (TDI_useless, &flags);
      if (file)
        {
! 	dump_function_to_file (current_function_decl, file, flags);
  	dump_end (TDI_useless, file);
        }
    }
--- 69,75 ----
      FILE *file = dump_begin (TDI_useless, &flags);
      if (file)
        {
! 	dump_function_to_file (fndecl, file, flags);
  	dump_end (TDI_useless, file);
        }
    }
*************** optimize_function_tree (tree fndecl)
*** 80,88 ****
  
    build_tree_cfg (DECL_SAVED_TREE (fndecl));
  
!   /* Begin analysis and optimization passes.  */
    if (n_basic_blocks > 0 && ! (errorcount || sorrycount))
      {
        /* Initialize common SSA structures.  */
        init_tree_ssa ();
  
--- 80,94 ----
  
    build_tree_cfg (DECL_SAVED_TREE (fndecl));
  
!   /* Begin analysis and optimization passes.  After the function is
!      initially renamed into SSA form, passes are responsible from keeping
!      it in SSA form.  If a pass exposes new symbols or invalidates the SSA
!      numbering for existing variables, it should add them to the
!      VARS_TO_RENAME bitmap and call rewrite_into_ssa() afterwards.  */
    if (n_basic_blocks > 0 && ! (errorcount || sorrycount))
      {
+       sbitmap vars_to_rename;
+ 
        /* Initialize common SSA structures.  */
        init_tree_ssa ();
  
*************** optimize_function_tree (tree fndecl)
*** 93,131 ****
  	 the function.  */
        compute_may_aliases (fndecl);
  
-       /* Rewrite the function into SSA form.  */
-       rewrite_into_ssa (fndecl, NULL);
  
        if (flag_tree_dce)
  	{
! 	  /* If the dominator optimizations propagated ADDR_EXPRs into
! 	     INDIRECT_REF expressions, we may be able to promote may-alias
! 	     into must-alias relations.  If DCE eliminated all the pointer
! 	     assignments that were taking the address of a local variable X,
! 	     we can now rename X as a non-aliased local.  */
! 	  tree_ssa_dce (fndecl);
! 	  if (flag_tree_dom && flag_tree_must_alias)
! 	    tree_compute_must_alias (fndecl);
  	}
  
        if (flag_tree_pre)
! 	tree_perform_ssapre (fndecl);
  
!       if (flag_tree_ccp)
! 	tree_ssa_ccp (fndecl);
  
        if (flag_tree_copyprop)
! 	tree_ssa_copyprop (fndecl);
  
        if (flag_tree_dce)
! 	tree_ssa_dce (fndecl);
  
        /* Rewrite the function out of SSA form.  */
!       rewrite_out_of_ssa (fndecl);
!     }
  
!   /* Debugging dump after optimization.  */
!   dump_function (TDI_optimized, fndecl);
  }
  
  
--- 99,189 ----
  	 the function.  */
        compute_may_aliases (fndecl);
  
  
+       /*			BEGIN SSA PASSES
+ 
+ 	 IMPORTANT: If you change the order in which these passes are
+ 		    executed, you also need to change the enum
+ 		    TREE_DUMP_INDEX in tree.h and DUMP_FILES in
+                     tree-dump.c.  */
+ 
+ 
+       /* Rewrite the function into SSA form.  Initially, request all
+ 	 variables to be renamed.  */
+       rewrite_into_ssa (fndecl, NULL, TDI_ssa_1);
+ 
+       /* Set up VARS_TO_RENAME to allow passes to inform which variables
+ 	 need to be renamed.  */
+       vars_to_rename = sbitmap_alloc (num_referenced_vars);
+ 
+       /* Perform dominator optimizations.  */
+       if (flag_tree_dom)
+ 	{
+ 	  sbitmap_zero (vars_to_rename);
+ 	  tree_ssa_dominator_optimize (fndecl, vars_to_rename, TDI_dom_1);
+ 
+ 	  /* If the dominator optimizations exposed new variables, we need
+ 	      to repeat the SSA renaming process for those symbols.  */
+ 	  if (sbitmap_first_set_bit (vars_to_rename) >= 0)
+ 	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_2);
+ 	}
+ 
+       /* Do a first DCE pass prior to must-alias.  This pass will remove
+ 	 dead pointer assignments taking the address of local variables.  */
        if (flag_tree_dce)
+ 	tree_ssa_dce (fndecl, TDI_dce_1);
+ 
+       /* The must-alias pass removes the aliasing and addressability bits
+ 	 from variables that used to have their address taken.  */
+       if (flag_tree_must_alias)
  	{
! 	  sbitmap_zero (vars_to_rename);
! 	  tree_compute_must_alias (fndecl, vars_to_rename, TDI_mustalias);
! 
! 	  /* Run the SSA pass again if we need to rename new variables.  */
! 	  if (sbitmap_first_set_bit (vars_to_rename) >= 0)
! 	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_3);
  	}
  
+       /* Run SCCP (Sparse Conditional Constant Propagation).  */
+       if (flag_tree_ccp)
+ 	{
+ 	  sbitmap_zero (vars_to_rename);
+ 	  tree_ssa_ccp (fndecl, vars_to_rename, TDI_ccp);
+ 
+ 	  /* Run the SSA pass again if we need to rename new variables.  */
+ 	  if (sbitmap_first_set_bit (vars_to_rename) >= 0)
+ 	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_4);
+ 	}
+ 
+       /* Run SSA-PRE (Partial Redundancy Elimination).  */
        if (flag_tree_pre)
! 	tree_perform_ssapre (fndecl, TDI_pre);
  
!       /* Perform a second pass of dominator optimizations.  */
!       if (flag_tree_dom)
! 	{
! 	  sbitmap_zero (vars_to_rename);
! 	  tree_ssa_dominator_optimize (fndecl, vars_to_rename, TDI_dom_2);
  
+ 	  /* There should not be any new symbols exposed.  */
+ 	  if (sbitmap_first_set_bit (vars_to_rename) >= 0)
+ 	    abort ();
+ 	}
+ 
+       /* Run copy propagation.  */
        if (flag_tree_copyprop)
! 	tree_ssa_copyprop (fndecl, TDI_copyprop);
  
+       /* Do a second DCE pass.  */
        if (flag_tree_dce)
! 	tree_ssa_dce (fndecl, TDI_dce_2);
  
        /* Rewrite the function out of SSA form.  */
!       rewrite_out_of_ssa (fndecl, TDI_optimized);
  
!       sbitmap_free (vars_to_rename);
!     }
  }
  
  
Index: tree-ssa-ccp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-ccp.c,v
retrieving revision 1.1.2.93
diff -d -c -p -r1.1.2.93 tree-ssa-ccp.c
*** tree-ssa-ccp.c	20 Sep 2003 12:31:53 -0000	1.1.2.93
--- tree-ssa-ccp.c	21 Sep 2003 21:26:57 -0000
*************** static void def_to_varying (tree);
*** 122,128 ****
  static void set_lattice_value (tree, value);
  static void simulate_block (basic_block);
  static void simulate_stmt (tree);
! static void substitute_and_fold (void);
  static value evaluate_stmt (tree);
  static void dump_lattice_value (FILE *, const char *, value);
  static bool replace_uses_in (tree);
--- 122,128 ----
  static void set_lattice_value (tree, value);
  static void simulate_block (basic_block);
  static void simulate_stmt (tree);
! static void substitute_and_fold (sbitmap);
  static value evaluate_stmt (tree);
  static void dump_lattice_value (FILE *, const char *, value);
  static bool replace_uses_in (tree);
*************** static int dump_flags;
*** 145,157 ****
  
  
  /* Main entry point for SSA Conditional Constant Propagation.  FNDECL is
!    the declaration for the function to optimize.  */
  
  void
! tree_ssa_ccp (tree fndecl)
  {
    timevar_push (TV_TREE_CCP);
  
    initialize ();
  
    /* Iterate until the worklists are empty.  */
--- 145,167 ----
  
  
  /* Main entry point for SSA Conditional Constant Propagation.  FNDECL is
!    the declaration for the function to optimize.
!    
!    On exit, VARS_TO_RENAME will contain the symbols that have been exposed by
!    the propagation of ADDR_EXPR expressions into pointer derferences and need
!    to be renamed into SSA.
! 
!    PHASE indicates which dump file from the DUMP_FILES array to use when
!    dumping debugging information.  */
  
  void
! tree_ssa_ccp (tree fndecl, sbitmap vars_to_rename, enum tree_dump_index phase)
  {
    timevar_push (TV_TREE_CCP);
  
+   /* Initialize debugging dumps.  */
+   dump_file = dump_begin (phase, &dump_flags);
+ 
    initialize ();
  
    /* Iterate until the worklists are empty.  */
*************** tree_ssa_ccp (tree fndecl)
*** 183,189 ****
      }
  
    /* Now perform substitutions based on the known constant values.  */
!   substitute_and_fold ();
  
    /* Now cleanup any unreachable code.  */
    cleanup_tree_cfg ();
--- 193,199 ----
      }
  
    /* Now perform substitutions based on the known constant values.  */
!   substitute_and_fold (vars_to_rename);
  
    /* Now cleanup any unreachable code.  */
    cleanup_tree_cfg ();
*************** tree_ssa_ccp (tree fndecl)
*** 204,210 ****
  	}
  
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (TDI_ccp, dump_file);
      }
  }
  
--- 214,220 ----
  	}
  
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (phase, dump_file);
      }
  }
  
*************** simulate_stmt (tree use_stmt)
*** 304,310 ****
     should still be in SSA form.  */
  
  static void
! substitute_and_fold (void)
  {
    basic_block bb;
  
--- 314,320 ----
     should still be in SSA form.  */
  
  static void
! substitute_and_fold (sbitmap vars_to_rename)
  {
    basic_block bb;
  
*************** substitute_and_fold (void)
*** 357,362 ****
--- 367,379 ----
  	    {
  	      fold_stmt (bsi_stmt_ptr (i));
  	      modify_stmt (stmt);
+ 
+ 	      /* If the statement is an assignment involving pointer
+ 		 dereferences, we may have exposed new symbols.  */
+ 	      if (TREE_CODE (stmt) == MODIFY_EXPR
+ 		  && (TREE_CODE (TREE_OPERAND (stmt, 0)) == INDIRECT_REF
+ 		      || TREE_CODE (TREE_OPERAND (stmt, 1)) == INDIRECT_REF))
+ 		mark_new_vars_to_rename (stmt, vars_to_rename);
  	    }
  
  	  if (dump_file && (dump_flags & TDF_DETAILS))
*************** visit_phi_node (tree phi)
*** 426,437 ****
  	if (e->flags & EDGE_EXECUTABLE)
  	  {
  	    tree rdef = PHI_ARG_DEF (phi, i);
! 	    value *rdef_val;
  
  	    if (TREE_CONSTANT (rdef))
  	      {
- 		value val;
- 
  		val.lattice_val = CONSTANT;
  		val.const_val = rdef;
  		rdef_val = &val;
--- 443,452 ----
  	if (e->flags & EDGE_EXECUTABLE)
  	  {
  	    tree rdef = PHI_ARG_DEF (phi, i);
! 	    value *rdef_val, val;
  
  	    if (TREE_CONSTANT (rdef))
  	      {
  		val.lattice_val = CONSTANT;
  		val.const_val = rdef;
  		rdef_val = &val;
*************** initialize (void)
*** 1013,1021 ****
  {
    edge e;
    basic_block bb;
- 
-   /* Initialize debugging dumps.  */
-   dump_file = dump_begin (TDI_ccp, &dump_flags);
  
    /* Initialize the values array with everything as undefined.  */
    const_values = htab_create (50, value_map_hash, value_map_eq, NULL);
--- 1028,1033 ----
Index: tree-ssa-copyprop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-copyprop.c,v
retrieving revision 1.1.2.14
diff -d -c -p -r1.1.2.14 tree-ssa-copyprop.c
*** tree-ssa-copyprop.c	17 Sep 2003 17:06:34 -0000	1.1.2.14
--- tree-ssa-copyprop.c	21 Sep 2003 21:26:57 -0000
*************** static void move_var_to_scope (tree, tre
*** 51,65 ****
  /* Main entry point to the copy propagator.  The algorithm is a simple
     linear scan of the flowgraph.  For every variable X_i used in the
     function, it retrieves its unique reaching definition.  If X_i's
!    definition is a copy (i.e., X_i = Y_j), then X_i is replaced with Y_j.  */
  
  void
! tree_ssa_copyprop (tree fndecl)
  {
    basic_block bb;
  
    timevar_push (TV_TREE_COPYPROP);
!   dump_file = dump_begin (TDI_copyprop, &dump_flags);
  
    /* Traverse every block in the flowgraph propagating copies in each
       statement.  */
--- 51,68 ----
  /* Main entry point to the copy propagator.  The algorithm is a simple
     linear scan of the flowgraph.  For every variable X_i used in the
     function, it retrieves its unique reaching definition.  If X_i's
!    definition is a copy (i.e., X_i = Y_j), then X_i is replaced with Y_j.
! 
!    PHASE indicates which dump file from the DUMP_FILES array to use when
!    dumping debugging information.  */
  
  void
! tree_ssa_copyprop (tree fndecl, enum tree_dump_index phase)
  {
    basic_block bb;
  
    timevar_push (TV_TREE_COPYPROP);
!   dump_file = dump_begin (phase, &dump_flags);
  
    /* Traverse every block in the flowgraph propagating copies in each
       statement.  */
*************** tree_ssa_copyprop (tree fndecl)
*** 78,84 ****
    if (dump_file)
      {
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (TDI_copyprop, dump_file);
      }
  
    timevar_pop (TV_TREE_COPYPROP);
--- 81,87 ----
    if (dump_file)
      {
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (phase, dump_file);
      }
  
    timevar_pop (TV_TREE_COPYPROP);
Index: tree-ssa-dce.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-dce.c,v
retrieving revision 1.1.2.54
diff -d -c -p -r1.1.2.54 tree-ssa-dce.c
*** tree-ssa-dce.c	18 Sep 2003 00:19:27 -0000	1.1.2.54
--- tree-ssa-dce.c	21 Sep 2003 21:26:57 -0000
*************** static FILE *dump_file;
*** 69,75 ****
  static int dump_flags;
  
  static varray_type worklist;
- static dominance_info dom_info = NULL;
  static dominance_info pdom_info = NULL;
  
  static struct stmt_stats
--- 69,74 ----
*************** remove_dead_stmts (void)
*** 453,459 ****
    tree t;
    block_stmt_iterator i;
  
-   dom_info = NULL;
    pdom_info = NULL;
  
    FOR_EACH_BB_REVERSE (bb)
--- 452,457 ----
*************** remove_dead_stmts (void)
*** 475,483 ****
      }
  
    /* If we needed the dominance info, free it now.  */
-   if (dom_info != NULL)
-     free_dominance_info (dom_info);
- 
    if (pdom_info != NULL)
      free_dominance_info (pdom_info);
  }
--- 473,478 ----
*************** remove_dead_stmt (block_stmt_iterator *i
*** 560,569 ****
    bsi_remove (i);
  }
  
! /* Main routine to eliminate dead code.  */
  
  void
! tree_ssa_dce (tree fndecl)
  {
    tree fnbody;
  
--- 555,567 ----
    bsi_remove (i);
  }
  
! /* Main routine to eliminate dead code.
! 
!    PHASE indicates which dump file from the DUMP_FILES array to use when
!    dumping debugging information.  */
  
  void
! tree_ssa_dce (tree fndecl, enum tree_dump_index phase)
  {
    tree fnbody;
  
*************** tree_ssa_dce (tree fndecl)
*** 580,586 ****
    needed_stmts = htab_create (64, htab_hash_pointer, htab_eq_pointer, NULL);
  
    /* Initialize dump_file for debugging dumps.  */
!   dump_file = dump_begin (TDI_dce, &dump_flags);
  
    find_useful_stmts ();
  
--- 578,584 ----
    needed_stmts = htab_create (64, htab_hash_pointer, htab_eq_pointer, NULL);
  
    /* Initialize dump_file for debugging dumps.  */
!   dump_file = dump_begin (phase, &dump_flags);
  
    find_useful_stmts ();
  
*************** tree_ssa_dce (tree fndecl)
*** 600,606 ****
      {
        dump_function_to_file (fndecl, dump_file, dump_flags);
        print_stats ();
!       dump_end (TDI_dce, dump_file);
      }
  
    htab_delete (needed_stmts);
--- 598,604 ----
      {
        dump_function_to_file (fndecl, dump_file, dump_flags);
        print_stats ();
!       dump_end (phase, dump_file);
      }
  
    htab_delete (needed_stmts);
*************** remove_conditional (basic_block bb)
*** 620,628 ****
    /* Calculate dominance info, if it hasn't been computed yet.  */
    if (pdom_info == NULL)
      pdom_info = calculate_dominance_info (CDI_POST_DOMINATORS);
- 
-   if (dom_info == NULL)
-     dom_info = calculate_dominance_info (CDI_DOMINATORS);
  
    pdom_bb = get_immediate_dominator (pdom_info, bb);
  
--- 618,623 ----
Index: tree-ssa-dom.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-dom.c,v
retrieving revision 1.1.2.40
diff -d -c -p -r1.1.2.40 tree-ssa-dom.c
*** tree-ssa-dom.c	19 Sep 2003 13:50:41 -0000	1.1.2.40
--- tree-ssa-dom.c	21 Sep 2003 21:26:57 -0000
*************** static void htab_statistics (FILE *, hta
*** 100,106 ****
  static void record_cond_is_false (tree, varray_type *, htab_t);
  static void record_cond_is_true (tree, varray_type *, htab_t);
  static void thread_edge (edge, basic_block);
- static void mark_new_vars_to_rename (tree, sbitmap);
  static tree update_rhs_and_lookup_avail_expr (tree, tree, varray_type *,
  					      htab_t, stmt_ann_t, bool);
  
--- 100,105 ----
*************** static tree update_rhs_and_lookup_avail_
*** 110,119 ****
  
     This pass may expose new symbols that need to be renamed into SSA.  For
     every new symbol exposed, its corresponding bit will be set in
!    VARS_TO_RENAME.  */
  
  void
! tree_ssa_dominator_optimize (tree fndecl, sbitmap vars_to_rename)
  {
    bool cfg_altered;
    edge e;
--- 109,122 ----
  
     This pass may expose new symbols that need to be renamed into SSA.  For
     every new symbol exposed, its corresponding bit will be set in
!    VARS_TO_RENAME.
! 
!    PHASE indicates which dump file from the DUMP_FILES array to use when
!    dumping debugging information.  */
  
  void
! tree_ssa_dominator_optimize (tree fndecl, sbitmap vars_to_rename,
! 			     enum tree_dump_index phase)
  {
    bool cfg_altered;
    edge e;
*************** tree_ssa_dominator_optimize (tree fndecl
*** 121,127 ****
    timevar_push (TV_TREE_SSA_DOMINATOR_OPTS);
  
    /* Set up debugging dump files.  */
!   dump_file = dump_begin (TDI_dom, &dump_flags);
  
    /* Create our hash tables.  */
    const_and_copies = htab_create (1024, var_value_hash, var_value_eq, free);
--- 124,130 ----
    timevar_push (TV_TREE_SSA_DOMINATOR_OPTS);
  
    /* Set up debugging dump files.  */
!   dump_file = dump_begin (phase, &dump_flags);
  
    /* Create our hash tables.  */
    const_and_copies = htab_create (1024, var_value_hash, var_value_eq, free);
*************** tree_ssa_dominator_optimize (tree fndecl
*** 194,213 ****
  	 the dominator tree is strictly necessary.  */
        if (cfg_altered)
  	{
! 	  dominance_info idom = calculate_dominance_info (CDI_DOMINATORS);
  	  build_dominator_tree (idom);
  	  free_dominance_info (idom);
  	}
      }
    while (cfg_altered);
  
    /* Debugging dumps.  */
    if (dump_file)
      {
        if (dump_flags & TDF_STATS)
  	dump_dominator_optimization_stats (dump_file);
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (TDI_dom, dump_file);
      }
  
    htab_delete (const_and_copies);
--- 197,221 ----
  	 the dominator tree is strictly necessary.  */
        if (cfg_altered)
  	{
! 	  dominance_info idom;
! 	  cleanup_tree_cfg ();
! 	  idom = calculate_dominance_info (CDI_DOMINATORS);
  	  build_dominator_tree (idom);
  	  free_dominance_info (idom);
  	}
      }
    while (cfg_altered);
  
+   /* Remove any unreachable blocks left behind and linearize the CFG.  */
+   cleanup_tree_cfg ();
+ 
    /* Debugging dumps.  */
    if (dump_file)
      {
        if (dump_flags & TDF_STATS)
  	dump_dominator_optimization_stats (dump_file);
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (phase, dump_file);
      }
  
    htab_delete (const_and_copies);
*************** tree_ssa_dominator_optimize (tree fndecl
*** 219,225 ****
--- 227,235 ----
    timevar_pop (TV_TREE_SSA_DOMINATOR_OPTS);
  }
  
+ 
  /* Redirects edge E to basic block DEST.  */
+ 
  static void
  thread_edge (edge e, basic_block dest)
  {
*************** thread_edge (edge e, basic_block dest)
*** 233,238 ****
--- 243,252 ----
        || bb->succ->succ_next)
      abort ();
  
+   /* Remove EDGE_FALLTHRU from the edge (by convention, control edges are
+      not fallthru).  */
+   flags &= ~EDGE_FALLTHRU;
+ 
    /* We need a label at our final destination.  If it does not already exist,
       create it.  */
    if (!dest_stmt
*************** thread_edge (edge e, basic_block dest)
*** 246,253 ****
    else
      label = LABEL_EXPR_LABEL (dest_stmt);
  
!   /* If our block does not end with a GOTO, then create one.  Otherwise redirect
!      the existing GOTO_EXPR to LABEL.  */
    stmt = last_stmt (bb);
    if (!stmt || TREE_CODE (stmt) != GOTO_EXPR)
      {
--- 260,267 ----
    else
      label = LABEL_EXPR_LABEL (dest_stmt);
  
!   /* If our block does not end with a GOTO, then create one.  Otherwise
!      redirect the existing GOTO_EXPR to LABEL.  */
    stmt = last_stmt (bb);
    if (!stmt || TREE_CODE (stmt) != GOTO_EXPR)
      {
*************** avail_expr_eq (const void *p1, const voi
*** 1594,1621 ****
  }
  
  
! /* Add all the variables found in STMT's operands to the bitmap
     VARS_TO_RENAME.  */
  
! static void
  mark_new_vars_to_rename (tree stmt, sbitmap vars_to_rename)
  {
    varray_type ops;
    size_t i;
  
    /* Before re-scanning the statement for operands, mark the existing
       virtual operands to be renamed again.  We do this because when new
!      symbols are exposed, the virtual operands that were here before
!      because of aliasing will probably be removed by the call to
!      get_stmt_operand.  Therefore, we need to flag them to be renamed
!      beforehand.  */
!   ops = vdef_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VDEF_RESULT (VARRAY_TREE (ops, i));
        if (!DECL_P (var))
  	var = SSA_NAME_VAR (var);
!       SET_BIT (vars_to_rename, var_ann (var)->uid);
      }
  
    ops = vuse_ops (stmt);
--- 1608,1644 ----
  }
  
  
! /* Add all the non-SSA variables found in STMT's operands to the bitmap
     VARS_TO_RENAME.  */
  
! void
  mark_new_vars_to_rename (tree stmt, sbitmap vars_to_rename)
  {
    varray_type ops;
    size_t i;
+   sbitmap vars_in_vops_to_rename;
+   bool found_exposed_symbol = false;
+   varray_type vdefs_before, vdefs_after;
+   
+   vars_in_vops_to_rename = sbitmap_alloc (num_referenced_vars);
+   sbitmap_zero (vars_in_vops_to_rename);
  
    /* Before re-scanning the statement for operands, mark the existing
       virtual operands to be renamed again.  We do this because when new
!      symbols are exposed, the virtual operands that were here before due to
!      aliasing will probably be removed by the call to get_stmt_operand.
!      Therefore, we need to flag them to be renamed beforehand.
! 
!      We flag them in a separate bitmap because we don't really want to
!      rename them if there are not any newly exposed symbols in the
!      statement operands.  */
!   vdefs_before = ops = vdef_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VDEF_RESULT (VARRAY_TREE (ops, i));
        if (!DECL_P (var))
  	var = SSA_NAME_VAR (var);
!       SET_BIT (vars_in_vops_to_rename, var_ann (var)->uid);
      }
  
    ops = vuse_ops (stmt);
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 1624,1630 ****
        tree var = VARRAY_TREE (ops, i);
        if (!DECL_P (var))
  	var = SSA_NAME_VAR (var);
!       SET_BIT (vars_to_rename, var_ann (var)->uid);
      }
  
    /* Now force an operand re-scan on the statement and mark any newly
--- 1647,1653 ----
        tree var = VARRAY_TREE (ops, i);
        if (!DECL_P (var))
  	var = SSA_NAME_VAR (var);
!       SET_BIT (vars_in_vops_to_rename, var_ann (var)->uid);
      }
  
    /* Now force an operand re-scan on the statement and mark any newly
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 1637,1643 ****
      {
        tree *var_p = VARRAY_TREE_PTR (ops, i);
        if (DECL_P (*var_p))
! 	SET_BIT (vars_to_rename, var_ann (*var_p)->uid);
      }
  
    ops = use_ops (stmt);
--- 1660,1669 ----
      {
        tree *var_p = VARRAY_TREE_PTR (ops, i);
        if (DECL_P (*var_p))
! 	{
! 	  found_exposed_symbol = true;
! 	  SET_BIT (vars_to_rename, var_ann (*var_p)->uid);
! 	}
      }
  
    ops = use_ops (stmt);
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 1645,1659 ****
      {
        tree *var_p = VARRAY_TREE_PTR (ops, i);
        if (DECL_P (*var_p))
! 	SET_BIT (vars_to_rename, var_ann (*var_p)->uid);
      }
  
!   ops = vdef_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VDEF_RESULT (VARRAY_TREE (ops, i));
        if (DECL_P (var))
! 	SET_BIT (vars_to_rename, var_ann (var)->uid);
      }
  
    ops = vuse_ops (stmt);
--- 1671,1691 ----
      {
        tree *var_p = VARRAY_TREE_PTR (ops, i);
        if (DECL_P (*var_p))
! 	{
! 	  found_exposed_symbol = true;
! 	  SET_BIT (vars_to_rename, var_ann (*var_p)->uid);
! 	}
      }
  
!   vdefs_after = ops = vdef_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VDEF_RESULT (VARRAY_TREE (ops, i));
        if (DECL_P (var))
! 	{
! 	  found_exposed_symbol = true;
! 	  SET_BIT (vars_to_rename, var_ann (var)->uid);
! 	}
      }
  
    ops = vuse_ops (stmt);
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 1661,1666 ****
      {
        tree var = VARRAY_TREE (ops, i);
        if (DECL_P (var))
! 	SET_BIT (vars_to_rename, var_ann (var)->uid);
      }
  }
--- 1693,1713 ----
      {
        tree var = VARRAY_TREE (ops, i);
        if (DECL_P (var))
! 	{
! 	  found_exposed_symbol = true;
! 	  SET_BIT (vars_to_rename, var_ann (var)->uid);
! 	}
      }
+ 
+   /* If we found any newly exposed symbols, or if VDEFs disappeared
+      altogether, add the variables we had set in VARS_IN_VOPS_TO_RENAME to
+      VARS_TO_RENAME.  We need to check for vanishing VDEFs because in those
+      cases, the names that were formerly generated by this statement are
+      not going to be available anymore.  */
+   if (found_exposed_symbol
+       || (vdefs_before != NULL
+ 	  && vdefs_after == NULL))
+     sbitmap_a_or_b (vars_to_rename, vars_to_rename, vars_in_vops_to_rename);
+ 
+   sbitmap_free (vars_in_vops_to_rename);
  }
Index: tree-ssa-pre.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-pre.c,v
retrieving revision 1.1.4.84
diff -d -c -p -r1.1.4.84 tree-ssa-pre.c
*** tree-ssa-pre.c	18 Sep 2003 03:56:25 -0000	1.1.4.84
--- tree-ssa-pre.c	21 Sep 2003 21:26:57 -0000
*************** pre_expression (struct expr_info *slot, 
*** 2752,2759 ****
  }
  
  
  void
! tree_perform_ssapre (tree fndecl)
  {
    int currbbs;
    block_stmt_iterator j;
--- 2752,2764 ----
  }
  
  
+ /* Main entry point to the SSA-PRE pass.
+ 
+    PHASE indicates which dump file from the DUMP_FILES array to use when
+    dumping debugging information.  */
+ 
  void
! tree_perform_ssapre (tree fndecl, enum tree_dump_index phase)
  {
    int currbbs;
    block_stmt_iterator j;
*************** tree_perform_ssapre (tree fndecl)
*** 2763,2769 ****
    int i;
    
    timevar_push (TV_TREE_PRE);
!   dump_file = dump_begin (TDI_pre, &dump_flags);
    VARRAY_GENERIC_PTR_INIT (bexprs, 1, "bexprs");
  
    /* Compute immediate dominators.  */
--- 2768,2774 ----
    int i;
    
    timevar_push (TV_TREE_PRE);
!   dump_file = dump_begin (phase, &dump_flags);
    VARRAY_GENERIC_PTR_INIT (bexprs, 1, "bexprs");
  
    /* Compute immediate dominators.  */
*************** tree_perform_ssapre (tree fndecl)
*** 2789,2797 ****
  	tree stmt = bsi_stmt (j);
  	stmt_ann_t ann;
  	struct expr_info *slot = NULL;
! 	ann = stmt_ann (expr);
  	if (use_ops (expr) == NULL)
  	  continue;
  	if (TREE_CODE (expr) == MODIFY_EXPR)
  	  expr = TREE_OPERAND (expr, 1);
  	if ((TREE_CODE_CLASS (TREE_CODE (expr)) == '2'
--- 2794,2806 ----
  	tree stmt = bsi_stmt (j);
  	stmt_ann_t ann;
  	struct expr_info *slot = NULL;
! 
! 	get_stmt_operands (expr);
  	if (use_ops (expr) == NULL)
  	  continue;
+ 
+ 	ann = stmt_ann (expr);
+ 
  	if (TREE_CODE (expr) == MODIFY_EXPR)
  	  expr = TREE_OPERAND (expr, 1);
  	if ((TREE_CODE_CLASS (TREE_CODE (expr)) == '2'
*************** tree_perform_ssapre (tree fndecl)
*** 2885,2891 ****
  	  fprintf (dump_file, "New phis:%d\n", pre_stats.newphis);
  	}
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (TDI_pre, dump_file);
      }
    memset (&pre_stats, 0, sizeof (struct pre_stats_d));
    VARRAY_CLEAR (bexprs);
--- 2894,2900 ----
  	  fprintf (dump_file, "New phis:%d\n", pre_stats.newphis);
  	}
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (phase, dump_file);
      }
    memset (&pre_stats, 0, sizeof (struct pre_stats_d));
    VARRAY_CLEAR (bexprs);
Index: tree-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa.c,v
retrieving revision 1.1.4.129
diff -d -c -p -r1.1.4.129 tree-ssa.c
*** tree-ssa.c	20 Sep 2003 12:31:53 -0000	1.1.4.129
--- tree-ssa.c	21 Sep 2003 21:26:58 -0000
*************** static void print_exprs_edge (FILE *, ed
*** 194,199 ****
--- 194,202 ----
     VARS.  If VARS is NULL, all variables in REFERENCED_VARS will be
     processed.
  
+    PHASE indicates which dump file from the DUMP_FILES array to use when
+    dumping debugging information.
+ 
     Every statement has two different sets of operands: real and virtual.
     Real operands are those that use scalar, non-aliased variables.  Virtual
     operands are everything else (pointers, arrays, compound structures).
*************** static void print_exprs_edge (FILE *, ed
*** 255,270 ****
     the original operand untouched.  So, the above code fragment is converted
     into:
  
! 	     	# AT.1_2 = VDEF <AT.1_1>;
  	    1	b = 4;
! 	        # AT.1_3 = VDEF <AT.1_2>;
  	    2	*p_3 = 5;
! 	     	# VUSE <AT.1_3>
  	    3	... = b;
  
     Notice how variable 'b' is not rewritten anymore.  Instead, references
     to it are moved to the virtual operands which are all rewritten using
!    AT.1, which is an artificial variable representing all the variables
     aliased by 'p'.
  
     Virtual operands provide safe information about potential references to
--- 258,273 ----
     the original operand untouched.  So, the above code fragment is converted
     into:
  
! 	     	# MT.1_2 = VDEF <MT.1_1>;
  	    1	b = 4;
! 	        # MT.1_3 = VDEF <MT.1_2>;
  	    2	*p_3 = 5;
! 	     	# VUSE <MT.1_3>
  	    3	... = b;
  
     Notice how variable 'b' is not rewritten anymore.  Instead, references
     to it are moved to the virtual operands which are all rewritten using
!    MT.1, which is an artificial variable representing all the variables
     aliased by 'p'.
  
     Virtual operands provide safe information about potential references to
*************** static void print_exprs_edge (FILE *, ed
*** 273,290 ****
     increased compilation time.  */
  
  void
! rewrite_into_ssa (tree fndecl, sbitmap vars)
  {
    bitmap *dfs;
    sbitmap globals;
    dominance_info idom;
-   int i, rename_count;
    basic_block bb;
    
    timevar_push (TV_TREE_SSA_OTHER);
  
    /* Debugging dumps.  */
!   dump_file = dump_begin (TDI_ssa, &dump_flags);
  
    /* Initialize the array of variables to rename.  */
    if (vars == NULL)
--- 276,292 ----
     increased compilation time.  */
  
  void
! rewrite_into_ssa (tree fndecl, sbitmap vars, enum tree_dump_index phase)
  {
    bitmap *dfs;
    sbitmap globals;
    dominance_info idom;
    basic_block bb;
    
    timevar_push (TV_TREE_SSA_OTHER);
  
    /* Debugging dumps.  */
!   dump_file = dump_begin (phase, &dump_flags);
  
    /* Initialize the array of variables to rename.  */
    if (vars == NULL)
*************** rewrite_into_ssa (tree fndecl, sbitmap v
*** 293,299 ****
        sbitmap_ones (vars_to_rename);
      }
    else
!     vars_to_rename = vars;
  
    /* Allocate memory for the DEF_BLOCKS hash table.  */
    def_blocks = htab_create (VARRAY_ACTIVE_SIZE (referenced_vars),
--- 295,304 ----
        sbitmap_ones (vars_to_rename);
      }
    else
!     {
!       vars_to_rename = vars;
!       remove_all_phi_nodes_for (vars_to_rename);
!     }
  
    /* Allocate memory for the DEF_BLOCKS hash table.  */
    def_blocks = htab_create (VARRAY_ACTIVE_SIZE (referenced_vars),
*************** rewrite_into_ssa (tree fndecl, sbitmap v
*** 314,397 ****
    /* Initialize dominance frontier and immediate dominator bitmaps.  */
    dfs = (bitmap *) xmalloc (n_basic_blocks * sizeof (bitmap *));
    FOR_EACH_BB (bb)
!     {
!       dfs[bb->index] = BITMAP_XMALLOC ();
!       clear_dom_children (bb);
!     }
  
!   /* Compute immediate dominators.  */
    idom = calculate_dominance_info (CDI_DOMINATORS);
- 
    build_dominator_tree (idom);
- 
    compute_dominance_frontiers (dfs, idom);
- 
-   /* We're finished the the immediate dominator information.  */
    free_dominance_info (idom);
  
!   /* Start the SSA rename process.  This may need to be repeated if the
!      dominator optimizations exposed more symbols to rename by propagating
!      ADDR_EXPR values into INDIRECT_REF expressions.  */
!   rename_count = 0;
!   do
!     {
!       /* Find variable references and mark definition sites.  */
!       mark_def_sites (globals);
! 
!       /* Insert PHI nodes at dominance frontiers of definition blocks.  */
!       insert_phi_nodes (dfs, globals);
! 
!       /* Rewrite all the basic blocks in the program.  */
!       timevar_push (TV_TREE_SSA_REWRITE_BLOCKS);
!       rewrite_block (ENTRY_BLOCK_PTR);
!       timevar_pop (TV_TREE_SSA_REWRITE_BLOCKS);
! 
!       /* Debugging dumps after renaming the function into SSA.  */
!       if (dump_file && (dump_flags & TDF_DETAILS))
! 	dump_function_to_file (fndecl, dump_file, dump_flags);
! 
!       /* Sanity check.  It's possible for the dominator optimizer to expose
! 	 new symbols more than once, but we don't want to spend an eternity
! 	 repeating this cycle.  FIXME: The threshold 3 was found by trial
! 	 and error.  In a bootstrap+test cycle it is only used in
! 	 gcc.c-torture/execute/930718-1.c.  */
!       if (rename_count++ >= 3)
! 	break;
! 
!       /* Now optimize all the basic blocks in the program.  */
!       sbitmap_zero (vars_to_rename);
!       if (flag_tree_dom)
! 	{
! 	  tree_ssa_dominator_optimize (fndecl, vars_to_rename);
! 
! 	  /* If the dominator optimizations exposed new variables, we need
! 	     to repeat the SSA renaming process for those symbols.  */
! 	  if (sbitmap_first_set_bit (vars_to_rename) >= 0)
! 	    {
! 	      /* Remove PHI nodes for the new symbols, clear the hash
! 		 tables and bitmaps and run SSA again on the new exposed
! 		 variables.  */
! 	      remove_all_phi_nodes_for (vars_to_rename);
! 	      htab_empty (def_blocks);
! 	      htab_empty (currdefs);
! 	      sbitmap_zero (globals);
! 	    }
! 	}
!     }
!   while (sbitmap_first_set_bit (vars_to_rename) >= 0);
  
!   /* Free allocated memory.  */
!   for (i = 0; i < n_basic_blocks; i++)
!     BITMAP_XFREE (dfs[i]);
!   free (dfs);
!   sbitmap_free (globals);
!   if (vars == NULL)
!     sbitmap_free (vars_to_rename);
  
!   /* The dominator optimizations may have made some blocks unreachable,
!      go ahead and clean things up.  */
!   if (flag_tree_dom)
!     cleanup_tree_cfg ();
  
    /* Debugging dumps.  */
    if (dump_file)
--- 319,345 ----
    /* Initialize dominance frontier and immediate dominator bitmaps.  */
    dfs = (bitmap *) xmalloc (n_basic_blocks * sizeof (bitmap *));
    FOR_EACH_BB (bb)
!     dfs[bb->index] = BITMAP_XMALLOC ();
  
!   /* Compute immediate dominators, dominance frontiers and the dominator
!      tree.  FIXME: DFS and dominator tree information should be cached.
!      Although, right now the only pass that doesn't mess dominance
!      information is must-alias.  */
    idom = calculate_dominance_info (CDI_DOMINATORS);
    build_dominator_tree (idom);
    compute_dominance_frontiers (dfs, idom);
    free_dominance_info (idom);
  
!   /* Find variable references and mark definition sites.  */
!   mark_def_sites (globals);
  
!   /* Insert PHI nodes at dominance frontiers of definition blocks.  */
!   insert_phi_nodes (dfs, globals);
  
!   /* Rewrite all the basic blocks in the program.  */
!   timevar_push (TV_TREE_SSA_REWRITE_BLOCKS);
!   rewrite_block (ENTRY_BLOCK_PTR);
!   timevar_pop (TV_TREE_SSA_REWRITE_BLOCKS);
  
    /* Debugging dumps.  */
    if (dump_file)
*************** rewrite_into_ssa (tree fndecl, sbitmap v
*** 403,411 ****
  	}
  
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (TDI_ssa, dump_file);
      }
  
    htab_delete (def_blocks);
    htab_delete (currdefs);
  
--- 351,368 ----
  	}
  
        dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (phase, dump_file);
      }
  
+   /* Free allocated memory.  */
+   FOR_EACH_BB (bb)
+     BITMAP_XFREE (dfs[bb->index]);
+   free (dfs);
+ 
+   sbitmap_free (globals);
+   if (vars == NULL)
+     sbitmap_free (vars_to_rename);
+ 
    htab_delete (def_blocks);
    htab_delete (currdefs);
  
*************** coalesce_vars (var_map map, tree_live_in
*** 1630,1639 ****
  }
  
  
! /* Take function FNDECL out of SSA form.  */
  
  void
! rewrite_out_of_ssa (tree fndecl)
  {
    basic_block bb;
    block_stmt_iterator si;
--- 1587,1599 ----
  }
  
  
! /* Take function FNDECL out of SSA form.
! 
!    PHASE indicates which dump file from the DUMP_FILES array to use when
!    dumping debugging information.  */
  
  void
! rewrite_out_of_ssa (tree fndecl, enum tree_dump_index phase)
  {
    basic_block bb;
    block_stmt_iterator si;
*************** rewrite_out_of_ssa (tree fndecl)
*** 1645,1651 ****
  
    timevar_push (TV_TREE_SSA_TO_NORMAL);
  
!   dump_file = dump_begin (TDI_optimized, &dump_flags);
  
    if (dump_file && (dump_flags & TDF_DETAILS))
      dump_tree_cfg (dump_file, dump_flags & ~TDF_DETAILS);
--- 1605,1611 ----
  
    timevar_push (TV_TREE_SSA_TO_NORMAL);
  
!   dump_file = dump_begin (phase, &dump_flags);
  
    if (dump_file && (dump_flags & TDF_DETAILS))
      dump_tree_cfg (dump_file, dump_flags & ~TDF_DETAILS);
*************** rewrite_out_of_ssa (tree fndecl)
*** 1773,1780 ****
    delete_var_map (map);
    timevar_pop (TV_TREE_SSA_TO_NORMAL);
  
    if (dump_file)
!     dump_end (TDI_optimized, dump_file);
  }
  
  
--- 1733,1744 ----
    delete_var_map (map);
    timevar_pop (TV_TREE_SSA_TO_NORMAL);
  
+   /* Debugging dumps.  */
    if (dump_file)
!     {
!       dump_function_to_file (fndecl, dump_file, dump_flags);
!       dump_end (phase, dump_file);
!     }
  }
  
  
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.342.2.100
diff -d -c -p -r1.342.2.100 tree.h
*** tree.h	18 Sep 2003 18:25:20 -0000	1.342.2.100
--- tree.h	21 Sep 2003 21:26:58 -0000
*************** enum tree_dump_index
*** 3444,3463 ****
  				   function's flowgraph.  */
    TDI_pta,                      /* dump points-to information for each
  				   function.  */
!   TDI_ssa,                      /* dump SSA information for each function.  */
!   TDI_dom,			/* dump dominator optimization information
! 				   for each function.  */
!   TDI_mustalias,		/* dump must-alias information for each
! 				   function.  */
!   TDI_pre,                      /* dump SSA PRE information for each
! 				   function.  */
!   TDI_ccp,			/* dump SSA CCP information for each
! 				   function.  */
!   TDI_copyprop,			/* dump SSA Copy propagation information for
! 				   each function.  */
!   TDI_dce,                      /* dump SSA DCE information for each
! 				   function.  */
!   TDI_optimized,		/* dump each function after optimizing it.  */
    TDI_mudflap,			/* dump each function after mudflap.  */
    TDI_xml,                      /* dump function call graph.   */
    TDI_all,			/* enable all the dumps above.  */
--- 3444,3468 ----
  				   function's flowgraph.  */
    TDI_pta,                      /* dump points-to information for each
  				   function.  */
!   TDI_alias,			/* dump aliasing information.  */
! 
!   /* Optimization passes.  The ordering and numbering of these phases must
!      be the same as the one in optimize_function_tree().  */
!   TDI_ssa_1,
!   TDI_dom_1,
!   TDI_ssa_2,
!   TDI_dce_1,
!   TDI_mustalias,
!   TDI_ssa_3,
!   TDI_ccp,
!   TDI_ssa_4,
!   TDI_pre,
!   TDI_dom_2,
!   TDI_ssa_5,
!   TDI_copyprop,
!   TDI_dce_2,
!   TDI_optimized,
! 
    TDI_mudflap,			/* dump each function after mudflap.  */
    TDI_xml,                      /* dump function call graph.   */
    TDI_all,			/* enable all the dumps above.  */
*************** enum tree_dump_index
*** 3475,3482 ****
  #define TDF_STATS	(1 << 4)	/* dump various statistics about
  					   each pass */
  #define TDF_BLOCKS	(1 << 5)	/* display basic block boundaries */
! #define TDF_ALIAS	(1 << 6)	/* display aliasing information */
! #define TDF_VOPS	(1 << 7)	/* display virtual operands */
  
  
  typedef struct dump_info *dump_info_p;
--- 3480,3486 ----
  #define TDF_STATS	(1 << 4)	/* dump various statistics about
  					   each pass */
  #define TDF_BLOCKS	(1 << 5)	/* display basic block boundaries */
! #define TDF_VOPS	(1 << 6)	/* display virtual operands */
  
  
  typedef struct dump_info *dump_info_p;
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.152.2.51
diff -d -c -p -r1.152.2.51 invoke.texi
*** doc/invoke.texi	20 Aug 2003 20:45:05 -0000	1.152.2.51
--- doc/invoke.texi	21 Sep 2003 21:27:02 -0000
*************** in the following sections.
*** 245,251 ****
  -fdump-tree-original@r{[}-@var{n}@r{]}  @gol
  -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-pre@r{[}-@var{n}@r{]} @gol
  -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
--- 245,251 ----
  -fdump-tree-original@r{[}-@var{n}@r{]}  @gol
  -fdump-tree-optimized@r{[}-@var{n}@r{]} @gol
  -fdump-tree-inlined@r{[}-@var{n}@r{]} @gol
! -fdump-tree-cfg -fdump-tree-dot -fdump-tree-alias @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-gimple@r{[}-raw@r{]} -fdump-tree-mudflap@r{[}-@var{n}@r{]} @gol
*************** Enable dumping various statistics about 
*** 3333,3341 ****
  option).
  @item blocks
  Enable showing basic block boundaries (disabled in raw dumps).
- @item alias
- Enable showing aliasing information for all the variables referenced in
- the program.
  @item vops
  Enable showing virtual operands for every statement.
  @item all
--- 3333,3338 ----
*************** file name is made by appending @file{.do
*** 3374,3382 ****
  Dump SSA related information to a file.  The file name is made by appending
  @file{.ssa} to the source file name.
  
  @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
--- 3371,3384 ----
  Dump SSA related information to a file.  The file name is made by appending
  @file{.ssa} to the source file name.
  
+ @item alias
+ @opindex fdump-tree-alias
+ Dump aliasing information for each function.  The file name is made by
+ appending @file{.alias} to the source file name.
+ 
  @item ccp
  @opindex fdump-tree-ccp
! Dump each function after CCP.  The file name is made by appending
  @file{.ccp} to the source file name.
  
  @item pre
Index: testsuite/gcc.dg/tree-ssa/20030530-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030530-2.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030530-2.c
*** testsuite/gcc.dg/tree-ssa/20030530-2.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030530-2.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
   
  
  typedef struct rs6000_stack {
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
   
  
  typedef struct rs6000_stack {
*************** rs6000_emit_prologue (int i, rs6000_stac
*** 16,26 ****
  
  /* There should be precisely one load of first_gp_reg_save.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "first_gp_reg_save" 1 "ssa"} } */
  
  /* There should be precisely one addition.  If there is more than one, then
     the dominator optimizations failed, most likely due to not handling
     commutative operands correctly.  */
! /* { dg-final { scan-tree-dump-times "\\+" 1 "ssa"} } */
   
  
--- 16,26 ----
  
  /* There should be precisely one load of first_gp_reg_save.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "first_gp_reg_save" 1 "dom2"} } */
  
  /* There should be precisely one addition.  If there is more than one, then
     the dominator optimizations failed, most likely due to not handling
     commutative operands correctly.  */
! /* { dg-final { scan-tree-dump-times "\\+" 1 "dom2"} } */
   
  
Index: testsuite/gcc.dg/tree-ssa/20030611-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030611-1.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030611-1.c
*** testsuite/gcc.dg/tree-ssa/20030611-1.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030611-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
   
  extern int square (int) __attribute__ ((__const__));
  shit(int a)
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
   
  extern int square (int) __attribute__ ((__const__));
  shit(int a)
*************** shit(int a)
*** 10,13 ****
  
  /* There should be precisely one call to square.   If there is more than one,
     then the dominator optimizations failed to remove the redundant call.  */
! /* { dg-final { scan-tree-dump-times "square" 1 "ssa"} } */
--- 10,13 ----
  
  /* There should be precisely one call to square.   If there is more than one,
     then the dominator optimizations failed to remove the redundant call.  */
! /* { dg-final { scan-tree-dump-times "square" 1 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030703-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030703-1.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030703-1.c
*** testsuite/gcc.dg/tree-ssa/20030703-1.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030703-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
    
  
  extern int blah[];
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
    
  
  extern int blah[];
*************** foo(int index)
*** 14,21 ****
  
  /* There should be precisely one load of blah.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "blah" 1 "ssa"} } */
   
  /* There should be exactly one IF conditional.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "ssa"} } */
  
--- 14,21 ----
  
  /* There should be precisely one load of blah.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "blah" 1 "dom2"} } */
   
  /* There should be exactly one IF conditional.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030703-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030703-2.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030703-2.c
*** testsuite/gcc.dg/tree-ssa/20030703-2.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030703-2.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
                                                                                  
  union tree_node;
  typedef union tree_node *tree;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
                                                                                  
  union tree_node;
  typedef union tree_node *tree;
*************** get_alias_set (t)
*** 27,38 ****
  
  /* There should be precisely one load of {t,__t}->code.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "->code" 1 "ssa"} } */
                                                                                  
  /* There should be precisely one load of tree_code_type.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "tree_code_type" 1 "ssa"} } */
  
! /* There should be two IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "ssa"} } */
  
--- 27,41 ----
  
  /* There should be precisely one load of {t,__t}->code.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "->code" 1 "dom2"} } */
                                                                                  
  /* There should be precisely one load of tree_code_type.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "tree_code_type" 1 "dom2"} } */
  
! /* There should be one IF conditional.  If 'tree_code_type[t->code]' is
!    zero, then the third if() conditional is unnecessary.  That should cause
!    the call to abort() to be removed, which in turn causes the whole second
!    if() to disappear.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030708-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030708-1.c,v
retrieving revision 1.1.2.3
diff -d -c -p -r1.1.2.3 20030708-1.c
*** testsuite/gcc.dg/tree-ssa/20030708-1.c	14 Aug 2003 20:36:34 -0000	1.1.2.3
--- testsuite/gcc.dg/tree-ssa/20030708-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
  struct rtx_def;
  typedef struct rtx_def *rtx;
  enum rtx_code
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
  struct rtx_def;
  typedef struct rtx_def *rtx;
  enum rtx_code
*************** nonlocal_mentioned_p (x)
*** 33,41 ****
  
  /* There should be precisely one cast to a short unsigned int.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "\\(short unsigned int\\)" 1 "ssa"} } */
                                                                                  
  /* There should be one IF conditional.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "ssa"} } */
                                                                                  
  
--- 33,41 ----
  
  /* There should be precisely one cast to a short unsigned int.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "\\(short unsigned int\\)" 1 "dom2"} } */
                                                                                  
  /* There should be one IF conditional.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "dom2"} } */
                                                                                  
  
Index: testsuite/gcc.dg/tree-ssa/20030709-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030709-2.c,v
retrieving revision 1.1.2.3
diff -d -c -p -r1.1.2.3 20030709-2.c
*** testsuite/gcc.dg/tree-ssa/20030709-2.c	12 Aug 2003 17:42:34 -0000	1.1.2.3
--- testsuite/gcc.dg/tree-ssa/20030709-2.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
    
  struct rtx_def;
  typedef struct rtx_def *rtx;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
    
  struct rtx_def;
  typedef struct rtx_def *rtx;
*************** get_alias_set (t)
*** 40,51 ****
  
  /* There should be precisely one load of ->decl.rtl.  If there is
     more than, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "->decl\\.rtl" 1 "ssa"} } */
    
  /* There should be precisely one load of .rtmem.  If there is
     more than, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times ".rtmem" 1 "ssa"} } */
    
! /* There should be two IF statements.
! /* { dg-final { scan-tree-dump-times "if " 2 "ssa"} } */
  
--- 40,51 ----
  
  /* There should be precisely one load of ->decl.rtl.  If there is
     more than, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "->decl\\.rtl" 1 "dom2"} } */
    
  /* There should be precisely one load of .rtmem.  If there is
     more than, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times ".rtmem" 1 "dom2"} } */
    
! /* There should be two IF statements.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030709-3.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030709-3.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030709-3.c
*** testsuite/gcc.dg/tree-ssa/20030709-3.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030709-3.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
    
  
  union tree_node;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
    
  
  union tree_node;
*************** record_component_aliases (type)
*** 35,45 ****
  
  /* There should be precisely one load of type.binfo.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "type\\.binfo" 1 "ssa"} } */
   
  /* There should be precisely one load of common.code.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "common\\.code" 1 "ssa"} } */
   
  /* There should be one IF conditional.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "ssa"} } */
--- 35,45 ----
  
  /* There should be precisely one load of type.binfo.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "type\\.binfo" 1 "dom2"} } */
   
  /* There should be precisely one load of common.code.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "common\\.code" 1 "dom2"} } */
   
  /* There should be one IF conditional.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030710-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030710-1.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030710-1.c
*** testsuite/gcc.dg/tree-ssa/20030710-1.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030710-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
  
  union tree_node;
  typedef union tree_node *tree;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
  
  union tree_node;
  typedef union tree_node *tree;
*************** record_component_aliases (type)
*** 40,53 ****
  /* The call to blah should have been eliminated.  If the call is not
     eliminated, then dominator optimizations failed and it'll be
     impossible to delete other unnecessary code.  */
! /* { dg-final { scan-tree-dump-not "blah \\(\\)" "ssa" } } */
    
  /* There should be two IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "ssa"} } */
                                                                                  
  /* There should be a single load of type.binfo.  */
! /* { dg-final { scan-tree-dump-times "type\\.binfo" 1 "ssa"} } */
  
  /* There should be two loads of vec.length.  */
! /* { dg-final { scan-tree-dump-times "vec.length" 2 "ssa"} } */
  
--- 40,53 ----
  /* The call to blah should have been eliminated.  If the call is not
     eliminated, then dominator optimizations failed and it'll be
     impossible to delete other unnecessary code.  */
! /* { dg-final { scan-tree-dump-not "blah \\(\\)" "dom2" } } */
    
  /* There should be two IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "dom2"} } */
                                                                                  
  /* There should be a single load of type.binfo.  */
! /* { dg-final { scan-tree-dump-times "type\\.binfo" 1 "dom2"} } */
  
  /* There should be two loads of vec.length.  */
! /* { dg-final { scan-tree-dump-times "vec.length" 2 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030711-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030711-1.c,v
retrieving revision 1.1.2.3
diff -d -c -p -r1.1.2.3 20030711-1.c
*** testsuite/gcc.dg/tree-ssa/20030711-1.c	12 Aug 2003 17:42:34 -0000	1.1.2.3
--- testsuite/gcc.dg/tree-ssa/20030711-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
   
  
  union tree_node;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
   
  
  union tree_node;
*************** record_component_aliases (type)
*** 40,53 ****
  }
  
  /* The call to blah can not be eliminated.
! /* { dg-final { scan-tree-dump-times "blah \\(\\)" 1 "ssa" } } */
     
  /* There should be three IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 3 "ssa"} } */
                                                                                  
  /* There should be two loads of type.binfo.  */
! /* { dg-final { scan-tree-dump-times "type\\.binfo" 2 "ssa"} } */
   
  /* There should be three loads of vec.length.  */
! /* { dg-final { scan-tree-dump-times "vec.length" 3 "ssa"} } */
  
--- 40,53 ----
  }
  
  /* The call to blah can not be eliminated.
! /* { dg-final { scan-tree-dump-times "blah \\(\\)" 1 "dom2" } } */
     
  /* There should be three IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 3 "dom2"} } */
                                                                                  
  /* There should be two loads of type.binfo.  */
! /* { dg-final { scan-tree-dump-times "type\\.binfo" 2 "dom2"} } */
   
  /* There should be three loads of vec.length.  */
! /* { dg-final { scan-tree-dump-times "vec.length" 3 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030711-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030711-2.c,v
retrieving revision 1.1.2.4
diff -d -c -p -r1.1.2.4 20030711-2.c
*** testsuite/gcc.dg/tree-ssa/20030711-2.c	14 Aug 2003 19:26:16 -0000	1.1.2.4
--- testsuite/gcc.dg/tree-ssa/20030711-2.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
    
  
  struct rtx_def;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
    
  
  struct rtx_def;
*************** get_alias_set (t,z)
*** 49,67 ****
  }
  
  /* The calls to make_decl_rtl should be eliminated
! /* { dg-final { scan-tree-dump-not "make_decl_rtl \\(\\)" "ssa" } } */
      
  /* There should be three IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 3 "ssa"} } */
                                                                                  
  /* There should be one loads of decl.rtl.  */
! /* { dg-final { scan-tree-dump-times "decl\\.rtl" 1 "ssa"} } */
    
  /* There should be one load of code.  */
! /* { dg-final { scan-tree-dump-times "code" 1 "ssa"} } */
  
  /* There should be one load of rtmem.  */
! /* { dg-final { scan-tree-dump-times "rtmem" 1 "ssa"} } */
  
  /* There should be one load of alias.  */
! /* { dg-final { scan-tree-dump-times "->alias" 1 "ssa"} } */
--- 49,67 ----
  }
  
  /* The calls to make_decl_rtl should be eliminated
! /* { dg-final { scan-tree-dump-not "make_decl_rtl \\(\\)" "dom2" } } */
      
  /* There should be three IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 3 "dom2"} } */
                                                                                  
  /* There should be one loads of decl.rtl.  */
! /* { dg-final { scan-tree-dump-times "decl\\.rtl" 1 "dom2"} } */
    
  /* There should be one load of code.  */
! /* { dg-final { scan-tree-dump-times "code" 1 "dom2"} } */
  
  /* There should be one load of rtmem.  */
! /* { dg-final { scan-tree-dump-times "rtmem" 1 "dom2"} } */
  
  /* There should be one load of alias.  */
! /* { dg-final { scan-tree-dump-times "->alias" 1 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030711-3.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030711-3.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030711-3.c
*** testsuite/gcc.dg/tree-ssa/20030711-3.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030711-3.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
    
  
  struct rtx_def;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
    
  
  struct rtx_def;
*************** get_alias_set (t)
*** 43,59 ****
                               t->decl.rtl)))->fld[1]).rtmem)->alias);
  }
  
! /* The calls to make_decl_rtl should be eliminated
! /* { dg-final { scan-tree-dump-not "make_decl_rtl \\(\\)" "ssa" } } */
      
  /* There should be two IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "ssa"} } */
                                                                                  
  /* There should be one load of decl.rtl.  */
! /* { dg-final { scan-tree-dump-times "decl\\.rtl" 1 "ssa"} } */
    
  /* There should be two loads of rtmem.  */
! /* { dg-final { scan-tree-dump-times "rtmem" 2 "ssa"} } */
  
  /* There should be one load of alias.  */
! /* { dg-final { scan-tree-dump-times "->alias" 1 "ssa"} } */
--- 43,59 ----
                               t->decl.rtl)))->fld[1]).rtmem)->alias);
  }
  
! /* The calls to make_decl_rtl should be eliminated.  */
! /* { dg-final { scan-tree-dump-not "make_decl_rtl \\(\\)" "dom2" } } */
      
  /* There should be two IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "dom2"} } */
                                                                                  
  /* There should be one load of decl.rtl.  */
! /* { dg-final { scan-tree-dump-times "decl\\.rtl" 1 "dom2"} } */
    
  /* There should be two loads of rtmem.  */
! /* { dg-final { scan-tree-dump-times "rtmem" 2 "dom2"} } */
  
  /* There should be one load of alias.  */
! /* { dg-final { scan-tree-dump-times "->alias" 1 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030714-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030714-1.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030714-1.c
*** testsuite/gcc.dg/tree-ssa/20030714-1.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030714-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
     
  struct rtx_def;
  typedef struct rtx_def *rtx;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
     
  struct rtx_def;
  typedef struct rtx_def *rtx;
*************** find_base_value (src)
*** 34,44 ****
  
  
  /* There should be six IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 6 "ssa"} } */
  
  /* There should be three casts to short unsigned int.  */
! /* { dg-final { scan-tree-dump-times "\\(short unsigned int\\)" 3 "ssa"} } */
  
! /* There should be three loads of ->code
! /* { dg-final { scan-tree-dump-times "->code" 3 "ssa"} } */
                                                                                  
--- 34,44 ----
  
  
  /* There should be six IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 6 "dom2"} } */
  
  /* There should be three casts to short unsigned int.  */
! /* { dg-final { scan-tree-dump-times "\\(short unsigned int\\)" 3 "dom2"} } */
  
! /* There should be three loads of ->code.  */
! /* { dg-final { scan-tree-dump-times "->code" 3 "dom2"} } */
                                                                                  
Index: testsuite/gcc.dg/tree-ssa/20030714-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030714-2.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030714-2.c
*** testsuite/gcc.dg/tree-ssa/20030714-2.c	14 Aug 2003 20:36:34 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030714-2.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
     
  
  union tree_node;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
     
  
  union tree_node;
*************** get_alias_set (t)
*** 34,39 ****
  
  /* There should be exactly three IF conditionals if we thread jumps
     properly.  */
! /* { dg-final { scan-tree-dump-times "if " 3 "ssa"} } */
   
  
--- 34,39 ----
  
  /* There should be exactly three IF conditionals if we thread jumps
     properly.  */
! /* { dg-final { scan-tree-dump-times "if " 3 "dom2"} } */
   
  
Index: testsuite/gcc.dg/tree-ssa/20030729-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030729-1.c,v
retrieving revision 1.1.2.4
diff -d -c -p -r1.1.2.4 20030729-1.c
*** testsuite/gcc.dg/tree-ssa/20030729-1.c	14 Aug 2003 19:26:16 -0000	1.1.2.4
--- testsuite/gcc.dg/tree-ssa/20030729-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
  
  union tree_node;
  typedef union tree_node *tree;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
  
  union tree_node;
  typedef union tree_node *tree;
*************** readonly_fields_p (type)
*** 44,51 ****
  /* A good optimizer would realize that the cast to (unsigned int) is
     useless as the earlier cast of the same value of (unsigned char) will
     always produce the same result.  */
! /* { dg-final { scan-tree-dump-times "\\(unsigned int\\)" 0 "ssa"} } */
   
  /* There should be one load of ->common.code.  We currently fail this
     because we load from ->common.code using different types.  */
! /* { dg-final { scan-tree-dump-times "common\.code" 1 "ssa"} } */
--- 44,51 ----
  /* A good optimizer would realize that the cast to (unsigned int) is
     useless as the earlier cast of the same value of (unsigned char) will
     always produce the same result.  */
! /* { dg-final { scan-tree-dump-times "\\(unsigned int\\)" 0 "dom2"} } */
   
  /* There should be one load of ->common.code.  We currently fail this
     because we load from ->common.code using different types.  */
! /* { dg-final { scan-tree-dump-times "common\.code" 1 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030730-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030730-1.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030730-1.c
*** testsuite/gcc.dg/tree-ssa/20030730-1.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030730-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O2 -fdump-tree-ssa" } */
       
  
  typedef struct dw_attr_struct *dw_attr_ref;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O2 -fdump-tree-dom2" } */
       
  
  typedef struct dw_attr_struct *dw_attr_ref;
*************** foo (int attr_kind, unsigned long offset
*** 18,23 ****
  }
  
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "ssa"} } */
                                                                                  
  
--- 18,23 ----
  }
  
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "dom2"} } */
                                                                                  
  
Index: testsuite/gcc.dg/tree-ssa/20030730-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030730-2.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030730-2.c
*** testsuite/gcc.dg/tree-ssa/20030730-2.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030730-2.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O2 -fdump-tree-ssa" } */
       
  
  typedef struct dw_attr_struct *dw_attr_ref;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O2 -fdump-tree-dom2" } */
       
  
  typedef struct dw_attr_struct *dw_attr_ref;
*************** foo (int attr_kind, unsigned long offset
*** 18,22 ****
  }
  
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "ssa"} } */
  
--- 18,22 ----
  }
  
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030731-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030731-1.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030731-1.c
*** testsuite/gcc.dg/tree-ssa/20030731-1.c	14 Aug 2003 20:36:35 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030731-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
    
  
  struct rtx_def;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
    
  
  struct rtx_def;
*************** store_expr (exp, target, want_value)
*** 58,62 ****
  /* All paths to the test "target != 0" occuring in the final IF statement
     dereference target.  Thus target can not have the value zero at that
     point and the test should have been eliminated.  */
! /* { dg-final { scan-tree-dump-times "target.*!= 0" 0 "ssa"} } */
  
--- 58,62 ----
  /* All paths to the test "target != 0" occuring in the final IF statement
     dereference target.  Thus target can not have the value zero at that
     point and the test should have been eliminated.  */
! /* { dg-final { scan-tree-dump-times "target.*!= 0" 0 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030807-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-1.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030807-1.c
*** testsuite/gcc.dg/tree-ssa/20030807-1.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030807-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
      
  struct rtx_def;
  typedef struct rtx_def *rtx;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
      
  struct rtx_def;
  typedef struct rtx_def *rtx;
*************** bar ()
*** 35,41 ****
      ;
  }
  
! /* There should be two IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "ssa"} } */
   
  
--- 35,42 ----
      ;
  }
  
! /* There should be one IF conditional.  The two inner conditionals in the
!    GIMPLE form are dead.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "dom2"} } */
   
  
Index: testsuite/gcc.dg/tree-ssa/20030807-10.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-10.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030807-10.c
*** testsuite/gcc.dg/tree-ssa/20030807-10.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030807-10.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
       
  
  extern const unsigned char mode_size[];
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
       
  
  extern const unsigned char mode_size[];
*************** subreg_highpart_offset (outermode, inner
*** 17,25 ****
    return offset;
  }
  
! /* There should be one mask with the value 3.
! /* { dg-final { scan-tree-dump-times " \& 3" 1 "ssa"} } */
    
! /* There should be one right shift by 2 places.
! /* { dg-final { scan-tree-dump-times " >> 2" 1 "ssa"} } */
  
--- 17,25 ----
    return offset;
  }
  
! /* There should be one mask with the value 3.  */
! /* { dg-final { scan-tree-dump-times " \& 3" 1 "dom2"} } */
    
! /* There should be one right shift by 2 places.  */
! /* { dg-final { scan-tree-dump-times " >> 2" 1 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030807-11.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-11.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030807-11.c
*** testsuite/gcc.dg/tree-ssa/20030807-11.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030807-11.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
  
  struct rtx_def;
  typedef struct rtx_def *rtx;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
  
  struct rtx_def;
  typedef struct rtx_def *rtx;
*************** foo (reg)
*** 16,19 ****
  }
                                                                                  
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "ssa"} } */
--- 16,19 ----
  }
                                                                                  
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030807-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-2.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030807-2.c
*** testsuite/gcc.dg/tree-ssa/20030807-2.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030807-2.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
       
  
  oof ()
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
       
  
  oof ()
*************** oof ()
*** 13,16 ****
  
                                                                                 
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "ssa"} } */
--- 13,16 ----
  
                                                                                 
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030807-3.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-3.c,v
retrieving revision 1.1.2.3
diff -d -c -p -r1.1.2.3 20030807-3.c
*** testsuite/gcc.dg/tree-ssa/20030807-3.c	20 Aug 2003 20:45:25 -0000	1.1.2.3
--- testsuite/gcc.dg/tree-ssa/20030807-3.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
                                                                                  
  typedef unsigned int cppchar_t;
  cppchar_t
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
                                                                                  
  typedef unsigned int cppchar_t;
  cppchar_t
*************** cpp_parse_escape (pstr, limit, wide)
*** 23,27 ****
  
  /* There should be precisely two IF statements.  If there is
     more than two, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "ssa"} } */
  
--- 23,27 ----
  
  /* There should be precisely two IF statements.  If there is
     more than two, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030807-4.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-4.c,v
retrieving revision 1.1.2.3
diff -d -c -p -r1.1.2.3 20030807-4.c
*** testsuite/gcc.dg/tree-ssa/20030807-4.c	20 Aug 2003 20:45:25 -0000	1.1.2.3
--- testsuite/gcc.dg/tree-ssa/20030807-4.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
  
  typedef struct cpp_reader cpp_reader;
  typedef unsigned int cppchar_t;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
  
  typedef struct cpp_reader cpp_reader;
  typedef unsigned int cppchar_t;
*************** cpp_parse_escape (pfile, pstr, limit, wi
*** 29,32 ****
  }
  
  /* There should be two IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "ssa"} } */
--- 29,32 ----
  }
  
  /* There should be two IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030807-5.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-5.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030807-5.c
*** testsuite/gcc.dg/tree-ssa/20030807-5.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030807-5.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
                                                                                  
  struct rtx_def;
  typedef struct rtx_def *rtx;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
                                                                                  
  struct rtx_def;
  typedef struct rtx_def *rtx;
*************** foo ()
*** 24,36 ****
  	         abort ();
  	       _rtx;}
  	   )->unchanging))
!     ;
  }
  
  /* There should be precisely one load of ->code.  If there is
     more than, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "->code" 1 "ssa"} } */
  
! /* There should be precisely one IF statement.  If there is
!    more than, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "ssa"} } */
--- 24,36 ----
  	         abort ();
  	       _rtx;}
  	   )->unchanging))
!     return 0;
  }
  
  /* There should be precisely one load of ->code.  If there is
     more than, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "->code" 1 "dom2"} } */
  
! /* There should be two IF statements.  One for 'current_sym_addr->code == 42'.
!    The other one for '(EXPR)->unchanging'.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030807-6.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-6.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030807-6.c
*** testsuite/gcc.dg/tree-ssa/20030807-6.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030807-6.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
       
  
  static void
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
       
  
  static void
*************** foo4 (distance, i, j)
*** 39,44 ****
  }
  
  /* There should be no ABS_EXPR.  */
! /* { dg-final { scan-tree-dump-times "ABS_EXPR " 0 "ssa"} } */
    
  
--- 39,44 ----
  }
  
  /* There should be no ABS_EXPR.  */
! /* { dg-final { scan-tree-dump-times "ABS_EXPR " 0 "dom2"} } */
    
  
Index: testsuite/gcc.dg/tree-ssa/20030807-7.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-7.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030807-7.c
*** testsuite/gcc.dg/tree-ssa/20030807-7.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030807-7.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
    
   
  
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
    
   
  
*************** simplify_condition (cond_p)
*** 32,36 ****
    c_simplify_stmt (&decl);
  }
  
! /* There should be exactly one IF conditional.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "ssa"} } */
--- 32,37 ----
    c_simplify_stmt (&decl);
  }
  
! /* There should be exactly one IF conditional.  TBAA is not able to 
!    determine that 'decl' and 'cond' can't alias.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030807-8.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-8.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030807-8.c
*** testsuite/gcc.dg/tree-ssa/20030807-8.c	17 Sep 2003 16:46:56 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030807-8.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
                                                                                  
  struct die_struct;
  typedef struct die_struct *dw_die_ref;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
                                                                                  
  struct die_struct;
  typedef struct die_struct *dw_die_ref;
*************** output_location_lists (die)
*** 49,52 ****
  }
  
  /* There should be exactly one IF conditional, in output_location_lists.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "ssa"} } */
--- 49,52 ----
  }
  
  /* There should be exactly one IF conditional, in output_location_lists.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030807-9.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-9.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030807-9.c
*** testsuite/gcc.dg/tree-ssa/20030807-9.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030807-9.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
  
  static void
  bar ()
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
  
  static void
  bar ()
*************** bar ()
*** 9,12 ****
  }
  
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "ssa"} } */
--- 9,12 ----
  }
  
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030808-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030808-1.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030808-1.c
*** testsuite/gcc.dg/tree-ssa/20030808-1.c	14 Aug 2003 19:26:16 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030808-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
        
  
  struct rtx_def;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
        
  
  struct rtx_def;
*************** delete_dead_jumptables ()
*** 31,38 ****
  
  /* There should be precisely one load of ->code.  If there is
     more than, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "->code" 1 "ssa"} } */
     
! /* There should be one IF statement.
! /* { dg-final { scan-tree-dump-times "if " 1 "ssa"} } */
  
--- 31,38 ----
  
  /* There should be precisely one load of ->code.  If there is
     more than, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "->code" 1 "dom2"} } */
     
! /* There should be one IF statement.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030814-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030814-1.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030814-1.c
*** testsuite/gcc.dg/tree-ssa/20030814-1.c	15 Aug 2003 05:16:32 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030814-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
     
  
  com(int *blah)
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
     
  
  com(int *blah)
*************** com(int *blah)
*** 15,20 ****
  
  /* There should be precisely one load of blah.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "\\*blah" 1 "ssa"} } */
    
  
--- 15,20 ----
  
  /* There should be precisely one load of blah.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "\\*blah" 1 "dom2"} } */
    
  
Index: testsuite/gcc.dg/tree-ssa/20030814-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030814-2.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030814-2.c
*** testsuite/gcc.dg/tree-ssa/20030814-2.c	15 Aug 2003 05:16:32 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030814-2.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
      
  
  void
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
      
  
  void
*************** foo (int value)
*** 16,21 ****
  }
  
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "ssa"} } */
   
  
--- 16,21 ----
  }
  
  /* There should be no IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 0 "dom2"} } */
   
  
Index: testsuite/gcc.dg/tree-ssa/20030814-3.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030814-3.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030814-3.c
*** testsuite/gcc.dg/tree-ssa/20030814-3.c	15 Aug 2003 05:16:32 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030814-3.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
      
  
  void
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
      
  
  void
*************** foo (int value)
*** 17,22 ****
  }
  
  /* There should be one IF conditional.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "ssa"} } */
   
  
--- 17,22 ----
  }
  
  /* There should be one IF conditional.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "dom2"} } */
   
  
Index: testsuite/gcc.dg/tree-ssa/20030814-4.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030814-4.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030814-4.c
*** testsuite/gcc.dg/tree-ssa/20030814-4.c	15 Aug 2003 12:45:47 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030814-4.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa -fdump-tree-optimized" } */
      
  union tree_node;
  typedef union tree_node *tree;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2 -fdump-tree-optimized" } */
      
  union tree_node;
  typedef union tree_node *tree;
*************** blah (decl, set)
*** 33,39 ****
  
  /* There should be precisely one reference to pointer_alias_set.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "pointer_alias_set" 1 "ssa"} } */
  
  /* The assignment set = -1 in the ELSE clause of the last IF
     statement should be removed by the final cleanup phase.  */
--- 33,39 ----
  
  /* There should be precisely one reference to pointer_alias_set.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "pointer_alias_set" 1 "dom2"} } */
  
  /* The assignment set = -1 in the ELSE clause of the last IF
     statement should be removed by the final cleanup phase.  */
Index: testsuite/gcc.dg/tree-ssa/20030814-5.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030814-5.c,v
retrieving revision 1.1.2.2
diff -d -c -p -r1.1.2.2 20030814-5.c
*** testsuite/gcc.dg/tree-ssa/20030814-5.c	15 Aug 2003 12:45:47 -0000	1.1.2.2
--- testsuite/gcc.dg/tree-ssa/20030814-5.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa -fdump-tree-optimized" } */
      
  union tree_node;
  typedef union tree_node *tree;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2 -fdump-tree-optimized" } */
      
  union tree_node;
  typedef union tree_node *tree;
*************** blah (decl, set)
*** 33,39 ****
  
  /* There should be precisely one reference to pointer_alias_set.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "pointer_alias_set" 1 "ssa"} } */
  
  /* The assignment set = -1 in the ELSE clause of the last IF
     statement should be removed by the final cleanup phase.  */
--- 33,39 ----
  
  /* There should be precisely one reference to pointer_alias_set.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "pointer_alias_set" 1 "dom2"} } */
  
  /* The assignment set = -1 in the ELSE clause of the last IF
     statement should be removed by the final cleanup phase.  */
Index: testsuite/gcc.dg/tree-ssa/20030814-6.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030814-6.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030814-6.c
*** testsuite/gcc.dg/tree-ssa/20030814-6.c	15 Aug 2003 16:05:33 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030814-6.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
  
  union tree_node;
  typedef union tree_node *tree;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
  
  union tree_node;
  typedef union tree_node *tree;
*************** foo (t, set)
*** 38,42 ****
  }
  /* There should be precisely one load of common.code.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "common.code" 1 "ssa"} } */
  
--- 38,42 ----
  }
  /* There should be precisely one load of common.code.  If there is
     more than one, then the dominator optimizations failed.  */
! /* { dg-final { scan-tree-dump-times "common.code" 1 "dom2"} } */
  
Index: testsuite/gcc.dg/tree-ssa/20030814-7.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030814-7.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030814-7.c
*** testsuite/gcc.dg/tree-ssa/20030814-7.c	15 Aug 2003 16:05:33 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030814-7.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
  
  struct rtx_def;
  typedef struct rtx_def *rtx;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
  
  struct rtx_def;
  typedef struct rtx_def *rtx;
*************** mark_constant_function (void)
*** 37,40 ****
     and the temporary used as the argument to cgraph_rtl_info.
     This if we find current_function_decl used as an argument, then
     we have failed.  */
! /* { dg-final { scan-tree-dump-times "\\(current_function_decl\\)" 0 "ssa"} } */
--- 37,40 ----
     and the temporary used as the argument to cgraph_rtl_info.
     This if we find current_function_decl used as an argument, then
     we have failed.  */
! /* { dg-final { scan-tree-dump-times "\\(current_function_decl\\)" 0 "dom2"} } */
Index: testsuite/gcc.dg/tree-ssa/20030815-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030815-1.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030815-1.c
*** testsuite/gcc.dg/tree-ssa/20030815-1.c	26 Aug 2003 08:13:31 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030815-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-ssa" } */
  
  typedef unsigned int size_t;
  struct rtx_def;
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O1 -fdump-tree-dom2" } */
  
  typedef unsigned int size_t;
  struct rtx_def;
*************** blah (unsigned int regno)
*** 36,41 ****
  
  /* If we have a cast to a struct rtx_def * *, then we failed to
     eliminate some useless typecasting.  */
! /* { dg-final { scan-tree-dump-times "\\(struct rtx_def \\* \\*\\)" 0 "ssa"} } */
                                                                                  
  
--- 36,41 ----
  
  /* If we have a cast to a struct rtx_def * *, then we failed to
     eliminate some useless typecasting.  */
! /* { dg-final { scan-tree-dump-times "\\(struct rtx_def \\* \\*\\)" 0 "dom2"} } */
                                                                                  
  
Index: testsuite/gcc.dg/tree-ssa/20030824-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030824-2.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030824-2.c
*** testsuite/gcc.dg/tree-ssa/20030824-2.c	25 Aug 2003 02:44:24 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030824-2.c	21 Sep 2003 21:27:03 -0000
*************** int foo (int x, int y)
*** 18,22 ****
    return i + j;
  }
  
! /* This function should be optimized into 'return x+y'.  */
  /* { dg-final { scan-tree-dump-times "return y \\+ x" 1 "optimized"} } */
--- 18,22 ----
    return i + j;
  }
  
! /* This function should be optimized into 'return y+x'.  */
  /* { dg-final { scan-tree-dump-times "return y \\+ x" 1 "optimized"} } */
Index: testsuite/gcc.dg/tree-ssa/20030907-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030907-1.c,v
retrieving revision 1.1.2.1
diff -d -c -p -r1.1.2.1 20030907-1.c
*** testsuite/gcc.dg/tree-ssa/20030907-1.c	7 Sep 2003 22:17:06 -0000	1.1.2.1
--- testsuite/gcc.dg/tree-ssa/20030907-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 4,10 ****
     the "Case Ranges" extension wasn't handled in tree-cfg.c.  */
  
  /* { dg-do compile } */
! /* { dg-options "-O -fdump-tree-ssa" } */
  
  int main() 
  { 
--- 4,10 ----
     the "Case Ranges" extension wasn't handled in tree-cfg.c.  */
  
  /* { dg-do compile } */
! /* { dg-options "-O -fdump-tree-optimized" } */
  
  int main() 
  { 
*************** int main() 
*** 24,27 ****
  
  /* The abort() call clearly is unreachable.  Only the "extern abort"
     declaration should survive optimization.  */
! /* { dg-final { scan-tree-dump-times "abort" 1 "ssa"} } */
--- 24,27 ----
  
  /* The abort() call clearly is unreachable.  Only the "extern abort"
     declaration should survive optimization.  */
! /* { dg-final { scan-tree-dump-times "abort" 1 "optimized"} } */
Index: testsuite/gcc.dg/tree-ssa/20030920-1.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/20030920-1.c
diff -N testsuite/gcc.dg/tree-ssa/20030920-1.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- testsuite/gcc.dg/tree-ssa/20030920-1.c	21 Sep 2003 21:27:03 -0000
***************
*** 0 ****
--- 1,112 ----
+ /* Jump threading was creating FALLTHRU edges out of blocks ending in
+    GOTO_EXPR.  */
+ 
+ extern int frame_pointer_needed;
+ 
+ struct value_data_entry
+ {
+   unsigned int mode;
+   unsigned int oldest_regno;
+   unsigned int next_regno;
+ };
+ 
+ struct value_data
+ {
+   struct value_data_entry e[53];
+   unsigned int max_value_regs;
+ };
+ 
+ struct rtx_def
+ {
+   unsigned int code: 16;
+   unsigned int mode : 8;
+   unsigned int jump : 1;
+   unsigned int call : 1;
+   unsigned int unchanging : 1;
+   unsigned int volatil : 1;
+   unsigned int in_struct : 1;
+   unsigned int used : 1;
+   unsigned integrated : 1;
+   unsigned frame_related : 1;
+   int fld[1];
+ };
+ 
+ typedef struct rtx_def *rtx;
+ 
+ enum machine_mode { VOIDmode, BImode, QImode, HImode, SImode, DImode,
+     TImode, OImode, PQImode, PHImode, PSImode, PDImode, QFmode, HFmode,
+     TQFmode, SFmode, DFmode, XFmode, TFmode, QCmode, HCmode, SCmode,
+     DCmode, XCmode, TCmode, CQImode, CHImode, CSImode, CDImode, CTImode,
+     COImode, V1DImode, V2QImode, V2HImode, V2SImode, V2DImode, V4QImode,
+     V4HImode, V4SImode, V4DImode, V8QImode, V8HImode, V8SImode, V8DImode,
+     V16QImode, V2HFmode, V2SFmode, V2DFmode, V4HFmode, V4SFmode, V4DFmode,
+     V8HFmode, V8SFmode, V8DFmode, V16SFmode, BLKmode, CCmode, CCGCmode,
+     CCGOCmode, CCNOmode, CCZmode, CCFPmode, CCFPUmode, MAX_MACHINE_MODE };
+ 
+ enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT, MODE_PARTIAL_INT, MODE_CC,
+     MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT,
+     MODE_VECTOR_INT, MODE_VECTOR_FLOAT,
+     MAX_MODE_CLASS};
+ 
+ extern const unsigned char mode_size[(int) MAX_MACHINE_MODE];
+ extern const enum mode_class mode_class[(int) MAX_MACHINE_MODE];
+ 
+ extern int target_flags;
+ 
+ static void
+ copy_value (rtx dest, rtx src, struct value_data *vd)
+ {
+   unsigned int dr = (((dest)->fld[0]));
+   unsigned int sr = (((src)->fld[0]));
+   unsigned int dn, sn;
+   unsigned int i;
+ 
+ 
+ 
+   if (sr == dr)
+     return;
+ 
+ 
+ 
+   if (dr == 7)
+     return;
+ 
+ 
+   if (frame_pointer_needed && dr == 6)
+     return;
+ 
+ 
+   dn = (((dr) >= 8 && (dr) <= (8 + 7)) || (((dr) >= (20 + 1) && (dr) <= ((20 + 1) + 7)) || ((dr) >= (((((((20 + 1) + 7) + 1) + 7) + 1) + 7) + 1) && (dr) <= ((((((((20 + 1) + 7) + 1) + 7) + 1) + 7) + 1) + 7))) || ((dr) >= (((20 + 1) + 7) + 1) && (dr) <= ((((20 + 1) + 7) + 1) + 7)) ? (((mode_class[(int) (((enum machine_mode) (dest)->mode))]) == MODE_COMPLEX_INT || (mode_class[(int) (((enum machine_mode) (dest)->mode))]) == MODE_COMPLEX_FLOAT) ? 2 : 1) : ((((enum machine_mode) (dest)->mode)) == TFmode ? ((target_flags & 0x00100000) ? 2 : 3) : (((enum machine_mode) (dest)->mode)) == TCmode ? ((target_flags & 0x00100000) ? 4 : 6) : (((mode_size[(int) (((enum machine_mode) (dest)->mode))]) + ((target_flags & 0x00100000) ? 8 : 4) - 1) / ((target_flags & 0x00100000) ? 8 : 4))));
+   sn = (((sr) >= 8 && (sr) <= (8 + 7)) || (((sr) >= (20 + 1) && (sr) <= ((20 + 1) + 7)) || ((sr) >= (((((((20 + 1) + 7) + 1) + 7) + 1) + 7) + 1) && (sr) <= ((((((((20 + 1) + 7) + 1) + 7) + 1) + 7) + 1) + 7))) || ((sr) >= (((20 + 1) + 7) + 1) && (sr) <= ((((20 + 1) + 7) + 1) + 7)) ? (((mode_class[(int) (((enum machine_mode) (dest)->mode))]) == MODE_COMPLEX_INT || (mode_class[(int) (((enum machine_mode) (dest)->mode))]) == MODE_COMPLEX_FLOAT) ? 2 : 1) : ((((enum machine_mode) (dest)->mode)) == TFmode ? ((target_flags & 0x00100000) ? 2 : 3) : (((enum machine_mode) (dest)->mode)) == TCmode ? ((target_flags & 0x00100000) ? 4 : 6) : (((mode_size[(int) (((enum machine_mode) (dest)->mode))]) + ((target_flags & 0x00100000) ? 8 : 4) - 1) / ((target_flags & 0x00100000) ? 8 : 4))));
+   if ((dr > sr && dr < sr + sn)
+       || (sr > dr && sr < dr + dn))
+     return;
+ 
+ 
+ 
+ 
+   if (vd->e[sr].mode == VOIDmode)
+     set_value_regno (sr, vd->e[dr].mode, vd);
+   else if (sn < (unsigned int) (((sr) >= 8 && (sr) <= (8 + 7)) || (((sr) >= (20 + 1) && (sr) <= ((20 + 1) + 7)) || ((sr) >= (((((((20 + 1) + 7) + 1) + 7) + 1) + 7) + 1) && (sr) <= ((((((((20 + 1) + 7) + 1) + 7) + 1) + 7) + 1) + 7))) || ((sr) >= (((20 + 1) + 7) + 1) && (sr) <= ((((20 + 1) + 7) + 1) + 7)) ? (((mode_class[(int) (vd->e[sr].mode)]) == MODE_COMPLEX_INT || (mode_class[(int) (vd->e[sr].mode)]) == MODE_COMPLEX_FLOAT) ? 2 : 1) : ((vd->e[sr].mode) == TFmode ? ((target_flags & 0x00100000) ? 2 : 3) : (vd->e[sr].mode) == TCmode ? ((target_flags & 0x00100000) ? 4 : 6) : (((mode_size[(int) (vd->e[sr].mode)]) + ((target_flags & 0x00100000) ? 8 : 4) - 1) / ((target_flags & 0x00100000) ? 8 : 4))))
+     && ((mode_size[(int) (vd->e[sr].mode)]) > ((target_flags & 0x00100000) ? 8 : 4)
+         ? 0 : 0))
+     return;
+ 
+ 
+ 
+ 
+   else if (sn > (unsigned int) (((sr) >= 8 && (sr) <= (8 + 7)) || (((sr) >= (20 + 1) && (sr) <= ((20 + 1) + 7)) || ((sr) >= (((((((20 + 1) + 7) + 1) + 7) + 1) + 7) + 1) && (sr) <= ((((((((20 + 1) + 7) + 1) + 7) + 1) + 7) + 1) + 7))) || ((sr) >= (((20 + 1) + 7) + 1) && (sr) <= ((((20 + 1) + 7) + 1) + 7)) ? (((mode_class[(int) (vd->e[sr].mode)]) == MODE_COMPLEX_INT || (mode_class[(int) (vd->e[sr].mode)]) == MODE_COMPLEX_FLOAT) ? 2 : 1) : ((vd->e[sr].mode) == TFmode ? ((target_flags & 0x00100000) ? 2 : 3) : (vd->e[sr].mode) == TCmode ? ((target_flags & 0x00100000) ? 4 : 6) : (((mode_size[(int) (vd->e[sr].mode)]) + ((target_flags & 0x00100000) ? 8 : 4) - 1) / ((target_flags & 0x00100000) ? 8 : 4)))))
+     return;
+ 
+ 
+ 
+   vd->e[dr].oldest_regno = vd->e[sr].oldest_regno;
+ 
+   for (i = sr; vd->e[i].next_regno != (~(unsigned int) 0); i = vd->e[i].next_regno)
+     continue;
+   vd->e[i].next_regno = dr;
+ 
+ 
+   validate_value_data (vd);
+ 
+ }


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