From 3cebc9d2da1484f906ddeab48cef7ab25482d3f9 Mon Sep 17 00:00:00 2001 From: law Date: Wed, 11 Jan 2006 20:39:42 +0000 Subject: * tree-ssa-threadupdate.c (threaded_edges): New VEC to hold edge pairs. (mark_threaded_blocks, register_jump_thread): New functions. (thread_through_all_blocks): Remove unwanted argument. No longer rely on e->aux to communicate thread target info. Call mark_threaded_blocks. Release the threaded_blocks bitmap and threaded_edges vector when complete. * tree-ssa-dom.c (struct edge_info): Remove redirection_target field. (threaded_blocks): Remove. (tree_ssa_dominator_optimize): Remove initialization and finalization of threaded_blocks. Simplify call to thread_through_all_blocks. (thread_across_edge): Call register_jump_thread rather than storing thread information into e->aux. (free_all_edge_infos): Simplify now that e->aux is no longer used to communicate with thread_through_all_blocks. * tree-flow.h (thread_through_all_blocks): Update prototype. (register_jump_thread): Prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109602 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa-dom.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'gcc/tree-ssa-dom.c') diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 3631a218b63..b522fac3e44 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -74,9 +74,6 @@ struct edge_info and its maximum index rather than use a varray. */ tree *cond_equivalences; unsigned int max_cond_equivalences; - - /* If we can thread this edge this field records the new target. */ - edge redirection_target; }; @@ -141,10 +138,6 @@ static VEC(tree,heap) *const_and_copies_stack; know their exact value. */ static bitmap nonzero_vars; -/* Bitmap of blocks that are scheduled to be threaded through. This - is used to communicate with thread_through_blocks. */ -static bitmap threaded_blocks; - /* Stack of SSA_NAMEs which need their NONZERO_VARS property cleared when the current block is finalized. @@ -326,10 +319,10 @@ free_all_edge_infos (void) if (edge_info) { - e->aux = edge_info->redirection_target; if (edge_info->cond_equivalences) free (edge_info->cond_equivalences); free (edge_info); + e->aux = NULL; } } } @@ -372,7 +365,6 @@ tree_ssa_dominator_optimize (void) vrp_variables_stack = VEC_alloc (tree, heap, 20); stmts_to_rescan = VEC_alloc (tree, heap, 20); nonzero_vars = BITMAP_ALLOC (NULL); - threaded_blocks = BITMAP_ALLOC (NULL); need_eh_cleanup = BITMAP_ALLOC (NULL); /* Setup callbacks for the generic dominator tree walker. */ @@ -448,7 +440,7 @@ tree_ssa_dominator_optimize (void) free_all_edge_infos (); /* Thread jumps, creating duplicate blocks as needed. */ - cfg_altered |= thread_through_all_blocks (threaded_blocks); + cfg_altered |= thread_through_all_blocks (); /* Removal of statements may make some EH edges dead. Purge such edges from the CFG as needed. */ @@ -487,7 +479,6 @@ tree_ssa_dominator_optimize (void) /* Reinitialize the various tables. */ bitmap_clear (nonzero_vars); - bitmap_clear (threaded_blocks); htab_empty (avail_exprs); htab_empty (vrp_data); @@ -533,7 +524,6 @@ tree_ssa_dominator_optimize (void) /* Free nonzero_vars. */ BITMAP_FREE (nonzero_vars); - BITMAP_FREE (threaded_blocks); BITMAP_FREE (need_eh_cleanup); VEC_free (tree, heap, avail_exprs_stack); @@ -924,8 +914,7 @@ thread_across_edge (struct dom_walk_data *walk_data, edge e) edge_info = (struct edge_info *) e->aux; else edge_info = allocate_edge_info (e); - edge_info->redirection_target = taken_edge; - bitmap_set_bit (threaded_blocks, e->dest->index); + register_jump_thread (e, taken_edge); } } } -- cgit v1.2.1