OSDN Git Service

* cfgloop.h (struct loop): Remove unused "nodes" field.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Nov 2004 03:24:44 +0000 (03:24 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Nov 2004 03:24:44 +0000 (03:24 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89932 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cfgloop.h
gcc/timevar.def
gcc/tree-data-ref.c
gcc/tree-ssa-loop.c

index 9821d51..5c03c9e 100644 (file)
@@ -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
index 96d865f..61af717 100644 (file)
@@ -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;
 
index 09de2e2..06ca03e 100644 (file)
@@ -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")
index 1ef964f..c34ae7f 100644 (file)
@@ -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;
 }
 
index 1eab89f..8ec9c3d 100644 (file)
@@ -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 */