* value-prof.c (static_values): Removed.
(tree_find_values_to_profile): Do not set static_values.
(find_values_to_profile): Do not free static_values.
* profile.c (instrument_values): Do not free the values.
(branch_prob): Free the values.
* gcc.dg/pr26570.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116197
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-08-16 Zdenek Dvorak <dvorakz@suse.cz>
+
+ PR gcov/profile/26570
+ * value-prof.c (static_values): Removed.
+ (tree_find_values_to_profile): Do not set static_values.
+ (find_values_to_profile): Do not free static_values.
+ * profile.c (instrument_values): Do not free the values.
+ (branch_prob): Free the values.
+
2006-08-16 Naveen.H.S <naveenh@kpitcummins.com>
* config/m32c/m32c_lib1.S (__mulsi3): Use only registers for dest.
gcc_unreachable ();
}
}
- VEC_free (histogram_value, heap, values);
}
\f
free_aux_for_edges ();
+ VEC_free (histogram_value, heap, values);
free_edge_list (el);
if (flag_branch_probabilities)
profile_status = PROFILE_READ;
+2006-08-16 Zdenek Dvorak <dvorakz@suse.cz>
+
+ PR gcov/profile/26570
+ * gcc.dg/pr26570.c: New test.
+
2006-08-16 Joseph S. Myers <joseph@codesourcery.com>
PR c/27697
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -fprofile-generate -fprofile-use" } */
+
+unsigned test (unsigned a, unsigned b)
+{
+ return a / b;
+} /* { dg-warning "execution counts estimated" } */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fprofile-generate -fprofile-use" } */
+
+unsigned test (unsigned a, unsigned b)
+{
+ return a / b;
+} /* { dg-warning "execution counts estimated" } */
static struct value_prof_hooks *value_prof_hooks;
-/* This is the vector of histograms. Created in find_values_to_profile.
- During profile generation, freed by instrument_values.
- During profile use, freed by value_profile_transformations. */
-
-static histogram_values static_values = NULL;
-
/* In this file value profile based optimizations are placed. Currently the
following optimizations are implemented (for more detailed descriptions
see comments at value_profile_transformations):
FOR_EACH_BB (bb)
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
tree_values_to_profile (bsi_stmt (bsi), values);
- static_values = *values;
for (i = 0; VEC_iterate (histogram_value, *values, i, hist); i++)
{
bool
value_profile_transformations (void)
{
- bool retval = (value_prof_hooks->value_profile_transformations) ();
- VEC_free (histogram_value, heap, static_values);
- return retval;
+ return (value_prof_hooks->value_profile_transformations) ();
}
\f