This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [vta,trunk?] stabilize hashing of SSA names and builtin function DECLs
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Alexandre Oliva" <aoliva at redhat dot com>
- Cc: "Daniel Berlin" <dberlin at dberlin dot org>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Dec 2008 10:58:03 +0100
- Subject: Re: [vta,trunk?] stabilize hashing of SSA names and builtin function DECLs
- References: <ord4hjf9un.fsf@oliva.athome.lsd.ic.unicamp.br> <84fc9c000810291317o65a22772g49102ea17910141a@mail.gmail.com> <ory707djet.fsf@oliva.athome.lsd.ic.unicamp.br> <4aca3dc20810292025s1de2b465pa2b7445b7b1f7b7e@mail.gmail.com> <or63ls7k9o.fsf@livre.oliva.athome.lsd.ic.unicamp.br>
On Wed, Dec 10, 2008 at 4:59 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
>> On Wed, Oct 29, 2008 at 8:19 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
>>> On Oct 29, 2008, "Richard Guenther" <richard.guenther@gmail.com> wrote:
>>>
>>>> + val = iterative_hash_host_wide_int (DECL_UID (SSA_NAME_VAR (t)), val);
>>>> + val = iterative_hash_host_wide_int (SSA_NAME_VERSION (t), val);
>>>
>>>> why both? I would say using SSA_NAME_VERSION should be enough?
>>>
>>> Enough, it is, sure. I figured rocking the boat a bit further might
>>> make for better hashing. No evidence of that, though.
>>>
>
>> The problem is that if you hash on DECL_UID as well, it will hide
>> problems where people are keeping ssa names that have been freed in
>> hash tables (since versions get reused but decl_uid would be
>> different).
>
>> This has actually happened in the past
>> :)
>
> I see. It doesn't seem to occur any more, but there's little point in
> doing more work when there's no indication it provides for better
> hashing *and* it might also hurt. So, here's an updated patch. I
> guess it's too late to fix this kind of bug in 4.4, though. Anyhow,
> ok for 4.5?
Ok for 4.5.
Thanks,
Richard.
>
> --
> Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
> You must be the change you wish to see in the world. -- Gandhi
> Be Free! -- http://FSFLA.org/ FSF Latin America board member
> Free Software Evangelist Red Hat Brazil Compiler Engineer
>
>