diff options
author | Jeff Law <law@redhat.com> | 2004-10-31 20:24:44 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2004-10-31 20:24:44 -0700 |
commit | ccbdbf0a4a98b8331aecc39188ef930923c95822 (patch) | |
tree | d9dc639eeb323bb9bfb212ca4c27abef24329cc5 | |
parent | db1de71358df247a01e1da358204155d23e3d08a (diff) | |
download | gcc-ccbdbf0a4a98b8331aecc39188ef930923c95822.zip gcc-ccbdbf0a4a98b8331aecc39188ef930923c95822.tar.gz gcc-ccbdbf0a4a98b8331aecc39188ef930923c95822.tar.bz2 |
cfgloop.h (struct loop): Remove unused "nodes" field.
* cfgloop.h (struct loop): Remove unused "nodes" field.
* timevar.def (TV_TREE_LOOP_BOUNDS): New.
* tree-data-ref.c (find_data_references_in_loop): Use get_loop_body
instead of calling flow_bb_inside_loop_p for every basic block
in the function.
* tree-ssa-loop.c (pass_record_bounds): Use TV_TREE_LOOP_BOUNDS.
From-SVN: r89932
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cfgloop.h | 3 | ||||
-rw-r--r-- | gcc/timevar.def | 1 | ||||
-rw-r--r-- | gcc/tree-data-ref.c | 14 | ||||
-rw-r--r-- | gcc/tree-ssa-loop.c | 2 |
5 files changed, 20 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9821d51..5c03c9e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2004-10-31 Jeff Law <law@redhat.com> + + * cfgloop.h (struct loop): Remove unused "nodes" field. + * timevar.def (TV_TREE_LOOP_BOUNDS): New. + * tree-data-ref.c (find_data_references_in_loop): Use get_loop_body + instead of calling flow_bb_inside_loop_p for every basic block + in the function. + * tree-ssa-loop.c (pass_record_bounds): Use TV_TREE_LOOP_BOUNDS. + 2004-10-31 Graham Stott <graham.stott@btinternet.com> * config/pa/pa.md: (prefetch_64, prefetch_32): Fix typo. Use diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 96d865f..61af717 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -97,9 +97,6 @@ struct loop the loop latch. */ basic_block last; - /* Bitmap of blocks contained within the loop. */ - sbitmap nodes; - /* Number of blocks contained within the loop. */ unsigned num_nodes; diff --git a/gcc/timevar.def b/gcc/timevar.def index 09de2e2..06ca03e 100644 --- a/gcc/timevar.def +++ b/gcc/timevar.def @@ -83,6 +83,7 @@ DEFTIMEVAR (TV_TREE_DCE , "tree conservative DCE") DEFTIMEVAR (TV_TREE_CD_DCE , "tree aggressive DCE") DEFTIMEVAR (TV_TREE_DSE , "tree DSE") DEFTIMEVAR (TV_TREE_LOOP , "tree loop optimization") +DEFTIMEVAR (TV_TREE_LOOP_BOUNDS , "tree record loop bounds") DEFTIMEVAR (TV_LIM , "loop invariant motion") DEFTIMEVAR (TV_TREE_LOOP_IVCANON , "tree canonical iv creation") DEFTIMEVAR (TV_TREE_LOOP_UNSWITCH , "tree loop unswitching") diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 1ef964f..c34ae7f 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -2204,14 +2204,16 @@ tree find_data_references_in_loop (struct loop *loop, varray_type *datarefs) { bool dont_know_node_not_inserted = true; - basic_block bb; + basic_block bb, *bbs; + unsigned int i; block_stmt_iterator bsi; - FOR_EACH_BB (bb) + bbs = get_loop_body (loop); + + for (i = 0; i < loop->num_nodes; i++) { - if (!flow_bb_inside_loop_p (loop, bb)) - continue; - + bb = bbs[i]; + for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi)) { tree stmt = bsi_stmt (bsi); @@ -2264,6 +2266,8 @@ find_data_references_in_loop (struct loop *loop, varray_type *datarefs) compute_estimated_nb_iterations (bb->loop_father); } + free (bbs); + return dont_know_node_not_inserted ? NULL_TREE : chrec_dont_know; } diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c index 1eab89f..8ec9c3d 100644 --- a/gcc/tree-ssa-loop.c +++ b/gcc/tree-ssa-loop.c @@ -317,7 +317,7 @@ struct tree_opt_pass pass_record_bounds = NULL, /* sub */ NULL, /* next */ 0, /* static_pass_number */ - 0, /* tv_id */ + TV_TREE_LOOP_BOUNDS, /* tv_id */ PROP_cfg | PROP_ssa, /* properties_required */ 0, /* properties_provided */ 0, /* properties_destroyed */ |