diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-22 17:18:23 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-22 17:18:23 +0000 |
commit | 63f236087f033781e482c61b8d159595cb371d4f (patch) | |
tree | d48fd46b997881efda1b77cb5b95669fa3c2921d /gcc/gcov.c | |
parent | 9c207309827b51482008b0bcc36f73d9147f6eaf (diff) | |
download | gcc-63f236087f033781e482c61b8d159595cb371d4f.tar.gz |
* regs.h (struct reg_info_def): Add freq field.
(REG_N_REFS): Update comment.
(REG_FREQ): New.
* regclass.c (scan_one_insn): Update REG_FREQ.
* flow.c (mark_set_1): Update REG_FREQ, make REG_N_SETS unweighted.
(attempt_auto_inc): Likewise.
(mark_used_reg): Likewise.
(try_pre_increment_1): Likewise.
* local-alloc.c (struct qty): Add freq field.
(alloc_qty): Set freq.
(update_equiv_regs): Set REG_FREQ.
(QTY_CMP_PRI): Use freq.
(combine_regs): Update qty->freq.
* global.c (struct allocno): Update comment for n_refs;
add freq field.
(local_reg_freq): New array.
(global_alloc): Update freq field;
allocate and initialize local_reg_freq.
(allocno_compare): Use freq field.
(find_reg): Likewise.
* reload1.c (count_pseudo): Use freq isntead of n_refs.
(count_spilled_pseudo): Likewise.
* tm.texi (GCOV_TYPE_SIZE): Document.
* basic-block.h (gcov_type): Define.
(struct edge_def): Use gcov_type for count field.
(struct basic_block_def): Likewise.
* defaults.h (GCOV_TYPE_SIZE): Define.
* final.c (end_final): Use GCOV_TYPE_SIZE.
* flow.c (dump_edge_info, dump_flow_info, dump_bb): Print count fields
using HOST_WIDEST_INT_PRINT_DEC.
* gcov-io.h (__fetch_gcov_type, __store_gcov_type, __read_gcov_type,
__write_gcov_type): New.
(store_long): Remove.
* gcov.c (gcov_type): Set default.
(struct adj_list): Use gcov_type for arc_count.
(bb_info): Use gcov_type for succ_count, pred_count and exec_count.
(create_program_flow_graph): Read arc_count properly.
(solve_program_flow_graph): 'total' is gcov_type.
(output_data): Line_counts is gcov_type, print it properly.
* libgcc2.c (struct bb): Counts is gcov_type.
(__bb_exit_func): Use __read_gcov_type and __write_gcov_type.
* profile.c (LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE): Set default.
(GCOV_TYPE_SIZE): Define.
(struct bb_info): succ_count and pred_count is gcov_type.
(compute_branch_probabilities): Use __read_gcov_type,
print read edges to the dump file.
(total): Is gcov_type.
(gen_edge_profiler): Use GCOV_TYPE_SIZE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43505 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r-- | gcc/gcov.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/gcc/gcov.c b/gcc/gcov.c index 457c4adec97..91cbbd64109 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -48,6 +48,7 @@ Boston, MA 02111-1307, USA. */ #include "intl.h" #undef abort +typedef HOST_WIDEST_INT gcov_type; #include "gcov-io.h" /* The .bb file format consists of several lists of 4-byte integers @@ -104,7 +105,7 @@ struct sourcefile *sources; struct adj_list { int source; int target; - int arc_count; + gcov_type arc_count; unsigned int count_valid : 1; unsigned int on_tree : 1; unsigned int fake : 1; @@ -123,9 +124,9 @@ struct adj_list { struct bb_info { struct adj_list *succ; struct adj_list *pred; - int succ_count; - int pred_count; - int exec_count; + gcov_type succ_count; + gcov_type pred_count; + gcov_type exec_count; unsigned int count_valid : 1; unsigned int on_tree : 1; #if 0 @@ -579,8 +580,8 @@ create_program_flow_graph (bptr) for (arcptr = bb_graph[i].succ; arcptr; arcptr = arcptr->succ_next) if (! arcptr->on_tree) { - long tmp_count = 0; - if (da_file && __read_long (&tmp_count, da_file, 8)) + gcov_type tmp_count = 0; + if (da_file && __read_gcov_type (&tmp_count, da_file, 8)) abort(); arcptr->arc_count = tmp_count; @@ -594,7 +595,8 @@ static void solve_program_flow_graph (bptr) struct bb_info_list *bptr; { - int passes, changes, total; + int passes, changes; + gcov_type total; int i; struct adj_list *arcptr; struct bb_info *bb_graph; @@ -975,7 +977,7 @@ output_data () int this_file; /* An array indexed by line number which indicates how many times that line was executed. */ - long *line_counts; + gcov_type *line_counts; /* An array indexed by line number which indicates whether the line was present in the bb file (i.e. whether it had code associate with it). Lines never executed are those which both exist, and have zero execution @@ -1035,7 +1037,7 @@ output_data () else source_file_name = s_ptr->name; - line_counts = (long *) xcalloc (sizeof (long), s_ptr->maxlineno); + line_counts = (gcov_type *) xcalloc (sizeof (gcov_type), s_ptr->maxlineno); line_exists = xcalloc (1, s_ptr->maxlineno); if (output_branch_probs) branch_probs = (struct arcdata **) @@ -1324,8 +1326,12 @@ output_data () if (line_exists[count]) { if (line_counts[count]) - fprintf (gcov_file, "%12ld %s", line_counts[count], - string); + { + char c[20]; + sprintf (c, HOST_WIDEST_INT_PRINT_DEC, (HOST_WIDEST_INT)line_counts[count]); + fprintf (gcov_file, "%12s %s", c, + string); + } else fprintf (gcov_file, " ###### %s", string); } |