aboutsummaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2005-08-01 11:51:17 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2005-08-01 09:51:17 +0000
commit5ded72541370aaeb3dd3d07c46ad16302df0329f (patch)
tree52b69359b3f87422c526ceaffce8a62c3eb41364 /gcc/profile.c
parenta8f82ec4377e4a314ec3d602f8f1f603bd76b749 (diff)
downloadgcc-5ded72541370aaeb3dd3d07c46ad16302df0329f.zip
gcc-5ded72541370aaeb3dd3d07c46ad16302df0329f.tar.gz
gcc-5ded72541370aaeb3dd3d07c46ad16302df0329f.tar.bz2
profile.c (compute_value_histograms): Fix thinko.
* 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. From-SVN: r102629
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 113927f..95448f0 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];