ggc-common.c (ggc_print_statistics): Cast size_t to unsigned long for printing.
authorRichard Henderson <rth@cygnus.com>
Tue, 16 Nov 1999 04:55:19 +0000 (20:55 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 16 Nov 1999 04:55:19 +0000 (20:55 -0800)
        * ggc-common.c (ggc_print_statistics): Cast size_t to unsigned long
        for printing.
        * ggc.h (struct ggc_statistics): Rearrange elements for better
        packing on 64-bit hosts.
        * lcm.c (compute_laterin): Store a size_t not an int in bb->aux.
        (compute_nearerout): Likewise.

From-SVN: r30547

gcc/ChangeLog
gcc/ggc-common.c
gcc/ggc.h
gcc/lcm.c

index c0fca5e838235735046554c14207f5deb952785a..b137d7ad38a478e4becdbafae070e8e84d38cd02 100644 (file)
@@ -5,6 +5,13 @@ Mon Nov 15 20:46:45 1999  Richard Henderson  <rth@cygnus.com>
 
        * flow.c (calculate_global_regs_live): Zero bb->aux to begin.
 
+       * ggc-common.c (ggc_print_statistics): Cast size_t to unsigned long
+       for printing.
+       * ggc.h (struct ggc_statistics): Rearrange elements for better
+       packing on 64-bit hosts.
+       * lcm.c (compute_laterin): Store a size_t not an int in bb->aux.
+       (compute_nearerout): Likewise.
+
 Tue Nov 16 14:37:52 1999  Geoffrey Keating  <geoffk@cygnus.com>
 
        * config/rs6000/rs6000.c (first_reg_to_save): Save
index 1a8aef538f921a710ae290cf474fb64b3f5e57ff..bacbcddbd5d19f392ea4b9c39b1c95325a3c82cf 100644 (file)
@@ -563,9 +563,9 @@ ggc_print_statistics (stream, stats)
                  / ggc_stats->total_size_trees));
       }
   fprintf (stream,
-          "%-22s%-15u %-15u\n", "Total",
+          "%-22s%-15u %-15lu\n", "Total",
           ggc_stats->total_num_trees,
-          ggc_stats->total_size_trees);
+          (unsigned long) ggc_stats->total_size_trees);
 
   /* Print the statistics for RTL.  */
   fprintf (stream, "\n%-22s%-16s%-16s%-7s\n", "Code", 
@@ -582,9 +582,9 @@ ggc_print_statistics (stream, stats)
                  / ggc_stats->total_size_rtxs));
       }
   fprintf (stream,
-          "%-22s%-15u %-15u\n", "Total",
+          "%-22s%-15u %-15lu\n", "Total",
           ggc_stats->total_num_rtxs,
-          ggc_stats->total_size_rtxs);
+          (unsigned long) ggc_stats->total_size_rtxs);
 
 
   /* Don't gather statistics any more.  */
index 2c12a139935b7a2b487446203b07d0970b3a15e9..3f55a21736b81e31e5e9d34373717a7f7d2debb8 100644 (file)
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -182,14 +182,14 @@ typedef struct ggc_statistics
   /* The Ith element is the number of bytes allocated by nodes with 
      code I.  */
   size_t size_rtxs[256];
-  /* The total number of tree nodes allocated.  */
-  unsigned total_num_trees;
   /* The total size of the tree nodes allocated.  */
   size_t total_size_trees;
-  /* The total number of RTL nodes allocated.  */
-  unsigned total_num_rtxs;
   /* The total size of the RTL nodes allocated.  */
   size_t total_size_rtxs;
+  /* The total number of tree nodes allocated.  */
+  unsigned total_num_trees;
+  /* The total number of RTL nodes allocated.  */
+  unsigned total_num_rtxs;
 } ggc_statistics;
 
 /* Return the number of bytes allocated at the indicated address.  */
index dd900b6132d57583b3d2c6e104ad2ce61c052aa2..a6cdd7d4974e963cd39d9e9cb6e9df595b69ba79 100644 (file)
--- a/gcc/lcm.c
+++ b/gcc/lcm.c
@@ -255,7 +255,7 @@ compute_laterin (edge_list, earliest, antloc, later, laterin)
 
   /* Initialize a mapping from each edge to its index.  */
   for (i = 0; i < num_edges; i++)
-    INDEX_EDGE (edge_list, i)->aux = (void *)i;
+    INDEX_EDGE (edge_list, i)->aux = (void *) (size_t) i;
 
   /* We want a maximal solution, so initially consider LATER true for
      all edges.  This allows propagation through a loop since the incoming
@@ -296,13 +296,13 @@ compute_laterin (edge_list, earliest, antloc, later, laterin)
       bb = b->index;
       sbitmap_ones (laterin[bb]);
       for (e = b->pred; e != NULL; e = e->pred_next)
-       sbitmap_a_and_b (laterin[bb], laterin[bb], later[(int)e->aux]);
+       sbitmap_a_and_b (laterin[bb], laterin[bb], later[(size_t)e->aux]);
 
       /* Calculate LATER for all outgoing edges.  */
       for (e = b->succ; e != NULL; e = e->succ_next)
        {
-         if (sbitmap_union_of_diff (later[(int)e->aux],
-                                    earliest[(int)e->aux],
+         if (sbitmap_union_of_diff (later[(size_t) e->aux],
+                                    earliest[(size_t) e->aux],
                                     laterin[e->src->index],
                                     antloc[e->src->index]))
            {
@@ -324,7 +324,7 @@ compute_laterin (edge_list, earliest, antloc, later, laterin)
   for (e = EXIT_BLOCK_PTR->pred; e != NULL; e = e->pred_next)
     sbitmap_a_and_b (laterin[n_basic_blocks],
                     laterin[n_basic_blocks],
-                    later[(int)e->aux]);
+                    later[(size_t) e->aux]);
 
   free (tos);
 }
@@ -600,7 +600,7 @@ compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout)
   /* Initialize NEARER for each edge and build a mapping from an edge to
      its index.  */
   for (i = 0; i < num_edges; i++)
-    INDEX_EDGE (edge_list, i)->aux = (void *)i;
+    INDEX_EDGE (edge_list, i)->aux = (void *) (size_t) i;
 
   /* We want a maximal solution.  */
   sbitmap_vector_ones (nearer, num_edges);
@@ -632,13 +632,14 @@ compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout)
       bb = b->index;
       sbitmap_ones (nearerout[bb]);
       for (e = b->succ; e != NULL; e = e->succ_next)
-       sbitmap_a_and_b (nearerout[bb], nearerout[bb], nearer[(int)e->aux]);
+       sbitmap_a_and_b (nearerout[bb], nearerout[bb],
+                        nearer[(size_t) e->aux]);
 
       /* Calculate NEARER for all incoming edges.  */
       for (e = b->pred; e != NULL; e = e->pred_next)
        {
-         if (sbitmap_union_of_diff (nearer[(int)e->aux],
-                                    farthest[(int)e->aux],
+         if (sbitmap_union_of_diff (nearer[(size_t) e->aux],
+                                    farthest[(size_t) e->aux],
                                     nearerout[e->dest->index],
                                     st_avloc[e->dest->index]))
            {
@@ -660,7 +661,7 @@ compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout)
   for (e = ENTRY_BLOCK_PTR->succ; e != NULL; e = e->succ_next)
     sbitmap_a_and_b (nearerout[n_basic_blocks],
                     nearerout[n_basic_blocks],
-                    nearer[(int)e->aux]);
+                    nearer[(size_t) e->aux]);
 
   free (tos);
 }