Commit 3522e0f2 by Jeff Law

flow.c (dump_sbitmap, [...]): New debugging functions.

8
        * flow.c (dump_sbitmap, dump_sbitmap_vector): New debugging
        functions.
        * basic-block.h: Declare them.

From-SVN: r19242
parent 74c5186c
......@@ -190,6 +190,9 @@ extern int *uid_block_number;
extern void compute_preds_succs PROTO ((int_list_ptr *, int_list_ptr *,
int *, int *));
extern void dump_bb_data PROTO ((FILE *, int_list_ptr *, int_list_ptr *));
extern void dump_sbitmap PROTO ((FILE *, sbitmap));
extern void dump_sbitmap_vector PROTO ((FILE *, char *, char *,
sbitmap *, int));
extern void free_bb_mem PROTO ((void));
extern void free_basic_block_vars PROTO ((int));
......
......@@ -3416,6 +3416,46 @@ dump_bb_data (file, preds, succs)
fprintf (file, "\n");
}
void
dump_sbitmap (file, bmap)
FILE *file;
sbitmap bmap;
{
int i,j,n;
int set_size = bmap->size;
int total_bits = bmap->n_bits;
fprintf (file, " ");
for (i = n = 0; i < set_size && n < total_bits; i++)
{
for (j = 0; j < SBITMAP_ELT_BITS && n < total_bits; j++, n++)
{
if (n != 0 && n % 10 == 0)
fprintf (file, " ");
fprintf (file, "%d", (bmap->elms[i] & (1L << j)) != 0);
}
}
fprintf (file, "\n");
}
void
dump_sbitmap_vector (file, title, subtitle, bmaps, n_maps)
FILE *file;
char *title, *subtitle;
sbitmap *bmaps;
int n_maps;
{
int bb;
fprintf (file, "%s\n", title);
for (bb = 0; bb < n_maps; bb++)
{
fprintf (file, "%s %d\n", subtitle, bb);
dump_sbitmap (file, bmaps[bb]);
}
fprintf (file, "\n");
}
/* Free basic block data storage. */
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment