remove call to memset in value-prof.c:free_hist()

Prathamesh Kulkarni prathamesh.kulkarni@linaro.org
Tue May 23 13:54:00 GMT 2017


Hi Jeff,
As discussed in the other thread, this patch removes dead call to
memset in free_hist().
Bootstrap+tested on x86_64-unknown-linux-gnu.
Cross-tested on arm*-*-*, aarch64*-*-*.
OK for trunk ?

Thanks,
Prathamesh
-------------- next part --------------
2017-05-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	* value-prof.c (free_hist): Remove call to memset and the enclosing if
	condition.

diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index 1ce0fda0ed2..7366070d97a 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -564,8 +564,6 @@ free_hist (void **slot, void *data ATTRIBUTE_UNUSED)
 {
   histogram_value hist = *(histogram_value *) slot;
   free (hist->hvalue.counters);
-  if (flag_checking)
-    memset (hist, 0xab, sizeof (*hist));
   free (hist);
   return 1;
 }


More information about the Gcc-patches mailing list