diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-01 09:51:17 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-01 09:51:17 +0000 |
commit | 2ca9602aef62b968ae1b74dac3a6701800a8347f (patch) | |
tree | 52b69359b3f87422c526ceaffce8a62c3eb41364 /gcc/profile.c | |
parent | 51b60a116d61e22b503d1d0061ab5046bccaa9b2 (diff) | |
download | gcc-2ca9602aef62b968ae1b74dac3a6701800a8347f.tar.gz |
* profile.c (compute_value_histograms): Fix thinko.
* value-prof.c: Include toplev.h
(check_counter): New function.
(tree_divmod_fixed_value_transform, tree_mod_pow2_value_transform,
tree_mod_subtract_transform): Add sanity check.
* val-prof-5.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102629 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/profile.c')
-rw-r--r-- | gcc/profile.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/profile.c b/gcc/profile.c index 113927fd44a..95448f076ff 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -651,14 +651,13 @@ compute_value_histograms (histogram_values values) gcov_type *histogram_counts[GCOV_N_VALUE_COUNTERS]; gcov_type *act_count[GCOV_N_VALUE_COUNTERS]; gcov_type *aact_count; - histogram_value hist = 0; for (t = 0; t < GCOV_N_VALUE_COUNTERS; t++) n_histogram_counters[t] = 0; for (i = 0; i < VEC_length (histogram_value, values); i++) { - hist = VEC_index (histogram_value, values, i); + histogram_value hist = VEC_index (histogram_value, values, i); n_histogram_counters[(int) hist->type] += hist->n_counters; } @@ -683,10 +682,10 @@ compute_value_histograms (histogram_values values) for (i = 0; i < VEC_length (histogram_value, values); i++) { + histogram_value hist = VEC_index (histogram_value, values, i); tree stmt = hist->hvalue.stmt; stmt_ann_t ann = get_stmt_ann (stmt); - hist = VEC_index (histogram_value, values, i); t = (int) hist->type; aact_count = act_count[t]; |