This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
64-bit cleanups
- To: gcc-patches at gcc dot gnu dot org
- Subject: 64-bit cleanups
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 15 Nov 1999 20:56:01 -0800
Silences some warnings on Alpha.
r~
* 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.
Index: ggc-common.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ggc-common.c,v
retrieving revision 1.15
diff -c -p -d -r1.15 ggc-common.c
*** ggc-common.c 1999/11/03 21:55:51 1.15
--- ggc-common.c 1999/11/16 04:52:33
*************** ggc_print_statistics (stream, stats)
*** 563,571 ****
/ ggc_stats->total_size_trees));
}
fprintf (stream,
! "%-22s%-15u %-15u\n", "Total",
ggc_stats->total_num_trees,
! ggc_stats->total_size_trees);
/* Print the statistics for RTL. */
fprintf (stream, "\n%-22s%-16s%-16s%-7s\n", "Code",
--- 563,571 ----
/ ggc_stats->total_size_trees));
}
fprintf (stream,
! "%-22s%-15u %-15lu\n", "Total",
ggc_stats->total_num_trees,
! (unsigned long) ggc_stats->total_size_trees);
/* Print the statistics for RTL. */
fprintf (stream, "\n%-22s%-16s%-16s%-7s\n", "Code",
*************** ggc_print_statistics (stream, stats)
*** 582,590 ****
/ ggc_stats->total_size_rtxs));
}
fprintf (stream,
! "%-22s%-15u %-15u\n", "Total",
ggc_stats->total_num_rtxs,
! ggc_stats->total_size_rtxs);
/* Don't gather statistics any more. */
--- 582,590 ----
/ ggc_stats->total_size_rtxs));
}
fprintf (stream,
! "%-22s%-15u %-15lu\n", "Total",
ggc_stats->total_num_rtxs,
! (unsigned long) ggc_stats->total_size_rtxs);
/* Don't gather statistics any more. */
Index: ggc.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ggc.h,v
retrieving revision 1.17
diff -c -p -d -r1.17 ggc.h
*** ggc.h 1999/10/29 04:17:32 1.17
--- ggc.h 1999/11/16 04:52:34
*************** typedef struct ggc_statistics
*** 182,195 ****
/* 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;
} ggc_statistics;
/* Return the number of bytes allocated at the indicated address. */
--- 182,195 ----
/* The Ith element is the number of bytes allocated by nodes with
code I. */
size_t size_rtxs[256];
/* The total size of the tree nodes allocated. */
size_t total_size_trees;
/* 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: lcm.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/lcm.c,v
retrieving revision 1.7
diff -c -p -d -r1.7 lcm.c
*** lcm.c 1999/11/15 06:12:50 1.7
--- lcm.c 1999/11/16 04:52:34
*************** compute_laterin (edge_list, earliest, an
*** 255,261 ****
/* Initialize a mapping from each edge to its index. */
for (i = 0; i < num_edges; i++)
! INDEX_EDGE (edge_list, i)->aux = (void *)i;
/* We want a maximal solution, so initially consider LATER true for
all edges. This allows propagation through a loop since the incoming
--- 255,261 ----
/* Initialize a mapping from each edge to its index. */
for (i = 0; i < num_edges; 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
*************** compute_laterin (edge_list, earliest, an
*** 296,308 ****
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]);
/* 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],
laterin[e->src->index],
antloc[e->src->index]))
{
--- 296,308 ----
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[(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[(size_t) e->aux],
! earliest[(size_t) e->aux],
laterin[e->src->index],
antloc[e->src->index]))
{
*************** compute_laterin (edge_list, earliest, an
*** 324,330 ****
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]);
free (tos);
}
--- 324,330 ----
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[(size_t) e->aux]);
free (tos);
}
*************** compute_nearerout (edge_list, farthest,
*** 600,606 ****
/* 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;
/* We want a maximal solution. */
sbitmap_vector_ones (nearer, num_edges);
--- 600,606 ----
/* 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 *) (size_t) i;
/* We want a maximal solution. */
sbitmap_vector_ones (nearer, num_edges);
*************** compute_nearerout (edge_list, farthest,
*** 632,644 ****
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]);
/* 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],
nearerout[e->dest->index],
st_avloc[e->dest->index]))
{
--- 632,645 ----
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[(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[(size_t) e->aux],
! farthest[(size_t) e->aux],
nearerout[e->dest->index],
st_avloc[e->dest->index]))
{
*************** compute_nearerout (edge_list, farthest,
*** 660,666 ****
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]);
free (tos);
}
--- 661,667 ----
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[(size_t) e->aux]);
free (tos);
}