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]

[PATCH][alias-improvements] Fix bootstrap after merge


This fixes the bootstrap failure during building libstdc++.  We may
not compute dominators if there are unreachable blocks - which can
happen in tree_function_versioning here if some calls no longer throw
and we removed EH regions.  The following patch streamlines the
!update_clones path, updates SSA less often and calls fold_cond_expr_cond
only once.  It also doesn't needlessly free dominator information again.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress, applied
to the branch.

Richard.

2009-03-29  Richard Guenther  <rguenther@suse.de>

	* tree-inline.c (tree_function_versioning): Do not call update_ssa
	if we are not updating clones.  Simplify.

Index: gcc/tree-inline.c
===================================================================
*** gcc/tree-inline.c	(revision 145211)
--- gcc/tree-inline.c	(working copy)
*************** tree_function_versioning (tree old_decl,
*** 4462,4488 ****
  
    /* Clean up.  */
    pointer_map_destroy (id.decl_map);
    if (!update_clones)
      {
        fold_marked_statements (0, id.statements_to_fold);
        pointer_set_destroy (id.statements_to_fold);
        fold_cond_expr_cond ();
!     }
!   if (gimple_in_ssa_p (cfun))
!     {
!       free_dominance_info (CDI_DOMINATORS);
!       free_dominance_info (CDI_POST_DOMINATORS);
!       if (!update_clones)
!         delete_unreachable_blocks ();
        update_ssa (TODO_update_ssa);
-       if (!update_clones)
- 	{
- 	  fold_cond_expr_cond ();
- 	  update_ssa (TODO_update_ssa);
- 	}
      }
-   free_dominance_info (CDI_DOMINATORS);
-   free_dominance_info (CDI_POST_DOMINATORS);
    VEC_free (gimple, heap, init_stmts);
    pop_cfun ();
    current_function_decl = old_current_function_decl;
--- 4462,4477 ----
  
    /* Clean up.  */
    pointer_map_destroy (id.decl_map);
+   free_dominance_info (CDI_DOMINATORS);
+   free_dominance_info (CDI_POST_DOMINATORS);
    if (!update_clones)
      {
        fold_marked_statements (0, id.statements_to_fold);
        pointer_set_destroy (id.statements_to_fold);
        fold_cond_expr_cond ();
!       delete_unreachable_blocks ();
        update_ssa (TODO_update_ssa);
      }
    VEC_free (gimple, heap, init_stmts);
    pop_cfun ();
    current_function_decl = old_current_function_decl;


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