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, commited] Move verify_ssa calls


into conditionals.
Date: Tue, 9 Dec 2003 00:25:19 +0100
User-Agent: KMail/1.5.4
MIME-Version: 1.0
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200312090025.19705.s.bosscher@student.tudelft.nl>
Status: RO
X-Status: Q
X-KMail-EncryptionState:  
X-KMail-SignatureState:  

We do pointless verify_ssa calls when we disable a pass.  Don't do that.

2003-12-08  Steven Bosscher  <stevenb@suse.de>

        * tree-optimize.c (optimize_function_tree): Move verify_ssa calls
        into conditionals.

Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 1.1.4.90
diff -c -3 -p -r1.1.4.90 tree-optimize.c
*** tree-optimize.c	7 Dec 2003 16:44:01 -0000	1.1.4.90
--- tree-optimize.c	8 Dec 2003 23:13:40 -0000
*************** optimize_function_tree (tree fndecl, tre
*** 121,131 ****
  	      to repeat the SSA renaming process for those symbols.  */
  	  if (bitmap_first_set_bit (vars_to_rename) >= 0)
  	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_2);
- 	}
  
  #ifdef ENABLE_CHECKING
!       verify_ssa ();
  #endif
  
        /* Do a first DCE pass prior to must-alias.  This pass will remove
  	 dead pointer assignments taking the address of local variables.  */
--- 121,131 ----
  	      to repeat the SSA renaming process for those symbols.  */
  	  if (bitmap_first_set_bit (vars_to_rename) >= 0)
  	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_2);
  
  #ifdef ENABLE_CHECKING
! 	  verify_ssa ();
  #endif
+ 	}
  
        /* Do a first DCE pass prior to must-alias.  This pass will remove
  	 dead pointer assignments taking the address of local variables.  */
*************** optimize_function_tree (tree fndecl, tre
*** 139,145 ****
  #endif
  
        if (flag_tree_loop)
! 	tree_ssa_loop_opt (fndecl, TDI_loop);
  
        /* The must-alias pass removes the aliasing and addressability bits
  	 from variables that used to have their address taken.  */
--- 139,151 ----
  #endif
  
        if (flag_tree_loop)
! 	{
! 	  tree_ssa_loop_opt (fndecl, TDI_loop);
! 
! #ifdef ENABLE_CHECKING
! 	  verify_ssa ();
! #endif
! 	}
  
        /* The must-alias pass removes the aliasing and addressability bits
  	 from variables that used to have their address taken.  */
*************** optimize_function_tree (tree fndecl, tre
*** 152,162 ****
  	  if (bitmap_first_set_bit (vars_to_rename) >= 0)
  	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_3);
            ggc_collect ();
- 	}
  
  #ifdef ENABLE_CHECKING
!       verify_ssa ();
  #endif
  
        /* Eliminate tail recursion calls.  */
        tree_optimize_tail_calls ();
--- 158,168 ----
  	  if (bitmap_first_set_bit (vars_to_rename) >= 0)
  	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_3);
            ggc_collect ();
  
  #ifdef ENABLE_CHECKING
! 	  verify_ssa ();
  #endif
+ 	}
  
        /* Eliminate tail recursion calls.  */
        tree_optimize_tail_calls ();
*************** optimize_function_tree (tree fndecl, tre
*** 175,185 ****
  	  if (bitmap_first_set_bit (vars_to_rename) >= 0)
  	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_4);
            ggc_collect ();
- 	}
  
  #ifdef ENABLE_CHECKING
!       verify_ssa ();
  #endif
  
        /* Run SCCP (Sparse Conditional Constant Propagation).  */
        if (flag_tree_ccp)
--- 181,191 ----
  	  if (bitmap_first_set_bit (vars_to_rename) >= 0)
  	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_4);
            ggc_collect ();
  
  #ifdef ENABLE_CHECKING
! 	  verify_ssa ();
  #endif
+ 	}
  
        /* Run SCCP (Sparse Conditional Constant Propagation).  */
        if (flag_tree_ccp)
*************** optimize_function_tree (tree fndecl, tre
*** 191,212 ****
  	  if (bitmap_first_set_bit (vars_to_rename) >= 0)
  	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_5);
            ggc_collect ();
- 	}
  
  #ifdef ENABLE_CHECKING
!       verify_ssa ();
  #endif
  
        /* Run SSA-PRE (Partial Redundancy Elimination).  */
        if (flag_tree_pre)
  	{
  	  tree_perform_ssapre (fndecl, TDI_pre);
  	  ggc_collect ();
- 	}
  
  #ifdef ENABLE_CHECKING
!       verify_ssa ();
  #endif
  
        /* Perform a second pass of dominator optimizations.  */
        if (flag_tree_dom)
--- 197,218 ----
  	  if (bitmap_first_set_bit (vars_to_rename) >= 0)
  	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_5);
            ggc_collect ();
  
  #ifdef ENABLE_CHECKING
! 	  verify_ssa ();
  #endif
+ 	}
  
        /* Run SSA-PRE (Partial Redundancy Elimination).  */
        if (flag_tree_pre)
  	{
  	  tree_perform_ssapre (fndecl, TDI_pre);
  	  ggc_collect ();
  
  #ifdef ENABLE_CHECKING
! 	  verify_ssa ();
  #endif
+ 	}
  
        /* Perform a second pass of dominator optimizations.  */
        if (flag_tree_dom)
*************** optimize_function_tree (tree fndecl, tre
*** 217,238 ****
  	  /* Run the SSA pass again if we need to rename new variables.  */
  	  if (bitmap_first_set_bit (vars_to_rename) >= 0)
  	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_6);
- 	}
  
  #ifdef ENABLE_CHECKING
!       verify_ssa ();
  #endif
  
        /* Do a second DCE pass.  */
        if (flag_tree_dce)
  	{
  	  tree_ssa_dce (fndecl, TDI_dce_2);
  	  ggc_collect ();
- 	}
  
  #ifdef ENABLE_CHECKING
!       verify_ssa ();
  #endif
  
  #if 0
        /* Eliminate tail recursion calls and discover sibling calls.  */
--- 223,244 ----
  	  /* Run the SSA pass again if we need to rename new variables.  */
  	  if (bitmap_first_set_bit (vars_to_rename) >= 0)
  	    rewrite_into_ssa (fndecl, vars_to_rename, TDI_ssa_6);
  
  #ifdef ENABLE_CHECKING
! 	  verify_ssa ();
  #endif
+ 	}
  
        /* Do a second DCE pass.  */
        if (flag_tree_dce)
  	{
  	  tree_ssa_dce (fndecl, TDI_dce_2);
  	  ggc_collect ();
  
  #ifdef ENABLE_CHECKING
! 	  verify_ssa ();
  #endif
+ 	}
  
  #if 0
        /* Eliminate tail recursion calls and discover sibling calls.  */


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