diff mbox

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

Message ID CAAgBjMmW4OS+tKMqRz5smnddsiaqbp1h7ih=6oAnj9PWyFhMig@mail.gmail.com
State New
Headers show

Commit Message

Prathamesh Kulkarni May 23, 2017, 1:50 p.m. UTC
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
2017-05-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

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

Comments

Jeff Law June 23, 2017, 4:47 a.m. UTC | #1
On 05/23/2017 07:50 AM, Prathamesh Kulkarni wrote:
> 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
> 
> 
> value-prof.txt
> 
> 
> 2017-05-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
> 
> 	* value-prof.c (free_hist): Remove call to memset and the enclosing if
> 	condition.
OK.  Sorry for the delay.

jeff
diff mbox

Patch

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;
 }