aboutsummaryrefslogtreecommitdiff
path: root/gcc/domwalk.h
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2009-06-27 14:45:51 +0000
committerPaolo Bonzini <bonzini@gcc.gnu.org>2009-06-27 14:45:51 +0000
commitccf5c864c9bae45e3c1a9858529f346005e5ca25 (patch)
tree4d282ef2e7bba7ac8b8f57bfadf3057c91cb6a6b /gcc/domwalk.h
parentc6bd4220c947db8bccef32768766ea2f030f70d5 (diff)
downloadgcc-ccf5c864c9bae45e3c1a9858529f346005e5ca25.zip
gcc-ccf5c864c9bae45e3c1a9858529f346005e5ca25.tar.gz
gcc-ccf5c864c9bae45e3c1a9858529f346005e5ca25.tar.bz2
domwalk.h (struct dom_walk_data): Remove all callbacks except before_dom_children_before_stmts and...
2009-06-27 Paolo Bonzini <bonzini@gnu.org> * domwalk.h (struct dom_walk_data): Remove all callbacks except before_dom_children_before_stmts and after_dom_children_after_stmts. Rename the two remaining callbacks to just before_dom_children and after_dom_children. Remove other GIMPLE statement walking bits. * domwalk.c (walk_dominator_tree): Remove now unsupported features. * graphite.c: Do not include domwalk.h. * tree-into-ssa.c (interesting_blocks): New global. (struct mark_def_sites_global_data): Remove it and names_to_rename. (mark_def_sites, rewrite_stmt, rewrite_add_phi_arguments, rewrite_update_stmt, rewrite_update_phi_arguments): Simplify now that they're not domwalk callbacks. (rewrite_initialize_block): Rename to... (rewrite_enter_block): ... this, place after called functions. Test interesting_blocks, call rewrite_stmt and rewrite_add_phi_arguments. (rewrite_finalize_block): Rename to... (rewrite_leave_block): ... this, place after called functions. (rewrite_update_init_block): Rename to... (rewrite_update_enter_block): ... this, place after called functions. Test interesting_blocks, call rewrite_update_stmt and rewrite_update_phi_arguments. (rewrite_update_fini_block): Rename to... (rewrite_leave_block): ... this, place after called functions. (rewrite_blocks): Remove last argument, simplify initialization of walk_data. (mark_def_sites_initialize_block): Rename to... (mark_def_sites_block): ... this, call mark_def_sites. (mark_def_sites_blocks): Remove argument, simplify initialization of walk_data. (rewrite_into_ssa): Adjust for interesting_blocks_being a global. (update_ssa): Likewise. * tree-ssa-dom.c (optimize_stmt): Simplify now that it's not a domwalk callback. (tree_ssa_dominator_optimize): Simplify initialization of walk_data. (dom_opt_initialize_block): Rename to... (dom_opt_enter_block): ... this, place after called functions. Walk statements here, inline propagate_to_outgoing_edges. (dom_opt_finalize_block): Rename to... (dom_opt_leave_block): ... this, place after called functions. * tree-ssa-dse.c (dse_optimize_stmt): Simplify now that it's not a domwalk callback. (dse_enter_block, dse_record_phi): New. (dse_record_phis): Delete. (dse_finalize_block): Rename to... (dse_leave_block): ... this. (tree_ssa_dse): Simplify initialization of walk_data. * tree-ssa-loop-im.c (determine_invariantness, move_computations): Adjust initialization of walk_data. * tree-ssa-loop-unswitch.c: Do not include domwalk.h. * tree-ssa-loop-phiopt.c (get_non_trapping): Adjust initialization of walk_data. * tree-ssa-loop-threadedge.c: Do not include domwalk.h. * tree-ssa-uncprop.c (uncprop_into_successor_phis): Simplify now that it's not a domwalk callback. (uncprop_initialize_block): Rename to... (dse_enter_block): ... this, call uncprop_into_successor_phis. (dse_finalize_block): Rename to... (dse_leave_block): ... this. (tree_ssa_uncprop): Simplify initialization of walk_data. * Makefile.in: Adjust dependencies. From-SVN: r149008
Diffstat (limited to 'gcc/domwalk.h')
-rw-r--r--gcc/domwalk.h55
1 files changed, 4 insertions, 51 deletions
diff --git a/gcc/domwalk.h b/gcc/domwalk.h
index 6589c0f..63aeec2 100644
--- a/gcc/domwalk.h
+++ b/gcc/domwalk.h
@@ -34,15 +34,6 @@ struct dom_walk_data
dominator tree. */
ENUM_BITFIELD (cdi_direction) dom_direction : 2;
- /* Nonzero if the statement walker should walk the statements from
- last to first within a basic block instead of first to last.
-
- Note this affects both statement walkers. We haven't yet needed
- to use the second statement walker for anything, so it's hard to
- predict if we really need the ability to select their direction
- independently. */
- BOOL_BITFIELD walk_stmts_backward : 1;
-
/* Function to initialize block local data.
Note that the dominator walker infrastructure may provide a new
@@ -55,41 +46,11 @@ struct dom_walk_data
void (*initialize_block_local_data) (struct dom_walk_data *,
basic_block, bool);
- /* Function to call before the statement walk occurring before the
- recursive walk of the dominator children.
-
- This typically initializes a block local data and pushes that
- data onto BLOCK_DATA_STACK. */
- void (*before_dom_children_before_stmts) (struct dom_walk_data *,
- basic_block);
-
- /* Function to call to walk statements before the recursive walk
- of the dominator children. */
- void (*before_dom_children_walk_stmts) (struct dom_walk_data *,
- basic_block, gimple_stmt_iterator);
-
- /* Function to call after the statement walk occurring before the
- recursive walk of the dominator children. */
- void (*before_dom_children_after_stmts) (struct dom_walk_data *,
- basic_block);
+ /* Function to call before the recursive walk of the dominator children. */
+ void (*before_dom_children) (struct dom_walk_data *, basic_block);
- /* Function to call before the statement walk occurring after the
- recursive walk of the dominator children. */
- void (*after_dom_children_before_stmts) (struct dom_walk_data *,
- basic_block);
-
- /* Function to call to walk statements after the recursive walk
- of the dominator children. */
- void (*after_dom_children_walk_stmts) (struct dom_walk_data *,
- basic_block, gimple_stmt_iterator);
-
- /* Function to call after the statement walk occurring after the
- recursive walk of the dominator children.
-
- This typically finalizes any block local data and pops
- that data from BLOCK_DATA_STACK. */
- void (*after_dom_children_after_stmts) (struct dom_walk_data *,
- basic_block);
+ /* Function to call after the recursive walk of the dominator children. */
+ void (*after_dom_children) (struct dom_walk_data *, basic_block);
/* Global data for a walk through the dominator tree. */
void *global_data;
@@ -108,14 +69,6 @@ struct dom_walk_data
/* Stack of available block local structures. */
VEC(void_p,heap) *free_block_data;
-
- /* Interesting blocks to process. If this field is not NULL, this
- set is used to determine which blocks to walk. If we encounter
- block I in the dominator traversal, but block I is not present in
- INTERESTING_BLOCKS, then none of the callback functions are
- invoked on it. This is useful when a particular traversal wants
- to filter out non-interesting blocks from the dominator tree. */
- sbitmap interesting_blocks;
};
void walk_dominator_tree (struct dom_walk_data *, basic_block);