--- Comment #17 from bergner at gcc dot gnu dot org 2008-01-17 03:28
---
Ok, after talking with Kenny offline, we agreed to commit Janis' patch that
changed xmalloc to xcalloc. As the comment I added to the changes says, if
future users of this code see a performance issue, we can revi
--- Comment #16 from bergner at gcc dot gnu dot org 2008-01-17 03:22
---
Subject: Bug 33796
Author: bergner
Date: Thu Jan 17 03:21:36 2008
New Revision: 131589
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131589
Log:
PR rtl-optimization/33796
* sparseset.c (sp
--- Comment #15 from bonzini at gnu dot org 2008-01-13 12:02 ---
Considering that we allocate exactly 1 sparseset per function, it cannot change
the performance in any way to initialize the memory, so maybe we do want to go
for that. But it is just stupid IMHO if the beauty of the data
--- Comment #14 from hp at gcc dot gnu dot org 2008-01-12 23:05 ---
(In reply to comment #9)
> i personally think that this patch in #8 is not the right way to go.
>
> unless there is a compelling argument that initializing this is going to have
> some negative performance effect, we sh
--- Comment #13 from dcb314 at hotmail dot com 2008-01-12 22:17 ---
(In reply to comment #9)
> i personally think that this patch in #8 is not the right way to go.
> unless there is a compelling argument that initializing this is going to have
> some negative performance effect, we shoul
--- Comment #12 from bonzini at gnu dot org 2008-01-12 21:09 ---
well if you can enjoy O(n) initialization (and O(1) clearing as in Peter's
code), you had better rewrite the code completely to query an item with one
(not two) memory accesses.
--
http://gcc.gnu.org/bugzilla/show_bug.
--- Comment #11 from zadeck at naturalbridge dot com 2008-01-12 17:05
---
until someone has the slightest bit of evidence that initializing the
datastructure is costly, this is just a waste of time.
peter wrote the code this way to be cute, not because there was any reason to
believe
--- Comment #10 from bonzini at gnu dot org 2008-01-12 16:52 ---
an alternative is to prepare a suppression file for valgrind, and distribute it
with gcc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33796
--- Comment #9 from zadeck at naturalbridge dot com 2008-01-12 16:34
---
i personally think that this patch in #8 is not the right way to go.
unless there is a compelling argument that initializing this is going to have
some negative performance effect, we should properly initialize th
--- Comment #8 from bonzini at gnu dot org 2007-10-31 13:21 ---
Reopening and marking as enhancement.
A patch like this should work:
Index: sparseset.c
===
--- sparseset.c (revision 129768)
+++ sparseset.c (working copy)
@
--- Comment #7 from bergner at gcc dot gnu dot org 2007-10-25 18:46 ---
>> So yes we do some uninitialized accesses to the sparse array, but that's
>> ok.
>
> So absolutely *any* value is fine ?
Yes, absolutely *any* value is fine. If you look at the code, you'll see that
the result
--- Comment #6 from dcb314 at hotmail dot com 2007-10-18 17:33 ---
(In reply to comment #2)
> Although valgrind is correct that we are doing an uninitialized read, the code
> is actually working as designed and is correct.
I wish I had a pound for every time I've heard that ;->
> So ye
--- Comment #5 from wilson at specifix dot com 2007-10-17 20:53 ---
Subject: Re: valgrind error with -O2 for linux
kernel code
bergner at gcc dot gnu dot org wrote:
> --- Comment #2 from bergner at gcc dot gnu dot org 2007-10-17 04:46
> ---
> Although valgrind is correct tha
--- Comment #4 from bergner at gcc dot gnu dot org 2007-10-17 14:21 ---
People using valgrind already have to deal with false positives and actual
uninitialized uses (like this one) that are harmless. If you look at your
valgrind install, you'll see that there are several error suppres
--- Comment #3 from zadeck at naturalbridge dot com 2007-10-17 11:25
---
Subject: Re: valgrind error with -O2 for linux
kernel code
bergner at gcc dot gnu dot org wrote:
> --- Comment #2 from bergner at gcc dot gnu dot org 2007-10-17 04:46
> ---
> Although valgrind is corre
--- Comment #2 from bergner at gcc dot gnu dot org 2007-10-17 04:46 ---
Although valgrind is correct that we are doing an uninitialized read, the code
is actually working as designed and is correct.
When we allocate a sparseset, we only need to set set->members to 0 to clear
the set. T
--
bergner at gcc dot gnu dot org changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last re
17 matches
Mail list logo