OSDN Git Service

* cfglayout.c (copy_bbs): Rename n_edges to num_edges.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Apr 2005 16:09:11 +0000 (16:09 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Apr 2005 16:09:11 +0000 (16:09 +0000)
* cfgloop.c (get_loop_exit_edges): Likewise.
* cfgloopmanip.c (fix_irreducible_loops): Likewise.
(unloop): Likewise.
* loop-unroll.c (analyze_insns_in_loop): Likewise.
* tree-cfg.c (dump_cfg_status): Likewise.

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

gcc/ChangeLog
gcc/cfglayout.c
gcc/cfgloop.c
gcc/cfgloopmanip.c
gcc/loop-unroll.c
gcc/tree-cfg.c

index 2b5ad90..b01ba2d 100644 (file)
@@ -1,3 +1,13 @@
+2005-04-09  Jan Hubicka  <jh@suse.cz>
+           Steven Bosscher  <stevenb@suse.de>
+
+       * cfglayout.c (copy_bbs): Rename n_edges to num_edges.
+       * cfgloop.c (get_loop_exit_edges): Likewise.
+       * cfgloopmanip.c (fix_irreducible_loops): Likewise.
+       (unloop): Likewise.
+       * loop-unroll.c (analyze_insns_in_loop): Likewise.
+       * tree-cfg.c (dump_cfg_status): Likewise.
+
 2005-04-09  David Edelsohn  <edelsohn@gnu.org>
 
        * config/rs6000/predicates.md (altivec_register_operand): Remove
index 6b60062..22c93f1 100644 (file)
@@ -1228,7 +1228,7 @@ end:
 
 void
 copy_bbs (basic_block *bbs, unsigned n, basic_block *new_bbs,
-         edge *edges, unsigned n_edges, edge *new_edges,
+         edge *edges, unsigned num_edges, edge *new_edges,
          struct loop *base)
 {
   unsigned i, j;
@@ -1267,7 +1267,7 @@ copy_bbs (basic_block *bbs, unsigned n, basic_block *new_bbs,
     }
 
   /* Redirect edges.  */
-  for (j = 0; j < n_edges; j++)
+  for (j = 0; j < num_edges; j++)
     new_edges[j] = NULL;
   for (i = 0; i < n; i++)
     {
@@ -1277,7 +1277,7 @@ copy_bbs (basic_block *bbs, unsigned n, basic_block *new_bbs,
 
       FOR_EACH_EDGE (e, ei, new_bb->succs)
        {
-         for (j = 0; j < n_edges; j++)
+         for (j = 0; j < num_edges; j++)
            if (edges[j] && edges[j]->src == bb && edges[j]->dest == e->dest)
              new_edges[j] = e;
 
index 0e258c6..553fd98 100644 (file)
@@ -926,7 +926,7 @@ get_loop_body_in_bfs_order (const struct loop *loop)
 
 /* Gets exit edges of a LOOP, returning their number in N_EDGES.  */
 edge *
-get_loop_exit_edges (const struct loop *loop, unsigned int *n_edges)
+get_loop_exit_edges (const struct loop *loop, unsigned int *num_edges)
 {
   edge *edges, e;
   unsigned i, n;
@@ -942,7 +942,7 @@ get_loop_exit_edges (const struct loop *loop, unsigned int *n_edges)
       if (!flow_bb_inside_loop_p (loop, e->dest))
        n++;
   edges = xmalloc (n * sizeof (edge));
-  *n_edges = n;
+  *num_edges = n;
   n = 0;
   for (i = 0; i < loop->num_nodes; i++)
     FOR_EACH_EDGE (e, ei, body[i]->succs)
index 50fad38..0a36978 100644 (file)
@@ -252,7 +252,7 @@ fix_irreducible_loops (basic_block from)
   int stack_top;
   sbitmap on_stack;
   edge *edges, e;
-  unsigned n_edges, i;
+  unsigned num_edges, i;
 
   if (!(from->flags & BB_IRREDUCIBLE_LOOP))
     return;
@@ -278,16 +278,16 @@ fix_irreducible_loops (basic_block from)
 
       bb->flags &= ~BB_IRREDUCIBLE_LOOP;
       if (bb->loop_father->header == bb)
-       edges = get_loop_exit_edges (bb->loop_father, &n_edges);
+       edges = get_loop_exit_edges (bb->loop_father, &num_edges);
       else
        {
-         n_edges = EDGE_COUNT (bb->succs);
-         edges = xmalloc (n_edges * sizeof (edge));
+         num_edges = EDGE_COUNT (bb->succs);
+         edges = xmalloc (num_edges * sizeof (edge));
          FOR_EACH_EDGE (e, ei, bb->succs)
            edges[ei.index] = e;
        }
 
-      for (i = 0; i < n_edges; i++)
+      for (i = 0; i < num_edges; i++)
        {
          e = edges[i];
 
@@ -574,7 +574,7 @@ unloop (struct loops *loops, struct loop *loop)
   unsigned i, n;
   basic_block latch = loop->latch;
   edge *edges;
-  unsigned n_edges;
+  unsigned num_edges;
 
   /* This is relatively straightforward.  The dominators are unchanged, as
      loop header dominates loop latch, so the only thing we have to care of
@@ -583,7 +583,7 @@ unloop (struct loops *loops, struct loop *loop)
      its work.  */
 
   body = get_loop_body (loop);
-  edges = get_loop_exit_edges (loop, &n_edges);
+  edges = get_loop_exit_edges (loop, &num_edges);
   n = loop->num_nodes;
   for (i = 0; i < n; i++)
     if (body[i]->loop_father == loop)
@@ -612,10 +612,10 @@ unloop (struct loops *loops, struct loop *loop)
      update the irreducible marks inside its body.  While it is certainly
      possible to do, it is a bit complicated and this situation should be
      very rare, so we just remark all loops in this case.  */
-  for (i = 0; i < n_edges; i++)
+  for (i = 0; i < num_edges; i++)
     if (edges[i]->flags & EDGE_IRREDUCIBLE_LOOP)
       break;
-  if (i != n_edges)
+  if (i != num_edges)
     mark_irreducible_loops (loops);
   free (edges);
 }
index e44dae6..ab3828d 100644 (file)
@@ -1640,14 +1640,14 @@ static struct opt_info *
 analyze_insns_in_loop (struct loop *loop)
 {
   basic_block *body, bb;
-  unsigned i, n_edges = 0;
+  unsigned i, num_edges = 0;
   struct opt_info *opt_info = xcalloc (1, sizeof (struct opt_info));
   rtx insn;
   struct iv_to_split *ivts = NULL;
   struct var_to_expand *ves = NULL;
   PTR *slot1;
   PTR *slot2;
-  edge *edges = get_loop_exit_edges (loop, &n_edges);
+  edge *edges = get_loop_exit_edges (loop, &num_edges);
   bool can_apply = false;
   
   iv_analysis_loop_init (loop);
@@ -1667,7 +1667,7 @@ analyze_insns_in_loop (struct loop *loop)
   else
     opt_info->loop_preheader = loop_preheader_edge (loop)->src;
   
-  if (n_edges == 1
+  if (num_edges == 1
       && !(edges[0]->flags & EDGE_COMPLEX))
     {
       opt_info->loop_exit = loop_split_edge_with (edges[0], NULL_RTX);
index 38d8215..d54408c 100644 (file)
@@ -2551,7 +2551,7 @@ dump_cfg_stats (FILE *file)
 {
   static long max_num_merged_labels = 0;
   unsigned long size, total = 0;
-  int n_edges;
+  long num_edges;
   basic_block bb;
   const char * const fmt_str   = "%-30s%-13s%12s\n";
   const char * const fmt_str_1 = "%-30s%13d%11lu%c\n";
@@ -2572,12 +2572,12 @@ dump_cfg_stats (FILE *file)
   fprintf (file, fmt_str_1, "Basic blocks", n_basic_blocks,
           SCALE (size), LABEL (size));
 
-  n_edges = 0;
+  num_edges = 0;
   FOR_EACH_BB (bb)
-    n_edges += EDGE_COUNT (bb->succs);
-  size = n_edges * sizeof (struct edge_def);
+    num_edges += EDGE_COUNT (bb->succs);
+  size = num_edges * sizeof (struct edge_def);
   total += size;
-  fprintf (file, fmt_str_1, "Edges", n_edges, SCALE (size), LABEL (size));
+  fprintf (file, fmt_str_1, "Edges", num_edges, SCALE (size), LABEL (size));
 
   size = n_basic_blocks * sizeof (struct bb_ann_d);
   total += size;