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/libgcc2.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/libgcc2.c')
-rw-r--r-- | gcc/libgcc2.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c index 177931df4c9..0c42ac6e2db 100644 --- a/gcc/libgcc2.c +++ b/gcc/libgcc2.c @@ -1263,12 +1263,19 @@ __eprintf (const char *string, const char *expression, #ifdef L_bb +#if LONG_TYPE_SIZE == GCOV_TYPE_SIZE +typedef long gcov_type; +#else +typedef long long gcov_type; +#endif + + /* Structure emitted by -a */ struct bb { long zero_word; const char *filename; - long *counts; + gcov_type *counts; long ncounts; struct bb *next; const unsigned long *addresses; @@ -1415,9 +1422,9 @@ __bb_exit_func (void) for (i = 0; i < n_counts; i++) { - long v = 0; + gcov_type v = 0; - if (__read_long (&v, da_file, 8) != 0) + if (__read_gcov_type (&v, da_file, 8) != 0) { fprintf (stderr, "arc profiling: Can't read output file %s.\n", ptr->filename); @@ -1439,7 +1446,7 @@ __bb_exit_func (void) That way we can easily verify that the proper source/executable/ data file combination is being used from gcov. */ - if (__write_long (ptr->ncounts, da_file, 8) != 0) + if (__write_gcov_type (ptr->ncounts, da_file, 8) != 0) { fprintf (stderr, "arc profiling: Error writing output file %s.\n", @@ -1448,11 +1455,11 @@ __bb_exit_func (void) else { int j; - long *count_ptr = ptr->counts; + gcov_type *count_ptr = ptr->counts; int ret = 0; for (j = ptr->ncounts; j > 0; j--) { - if (__write_long (*count_ptr, da_file, 8) != 0) + if (__write_gcov_type (*count_ptr, da_file, 8) != 0) { ret=1; break; |