This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Turn streamer cache to pointer_map


Hi,

On Mon, 2 May 2011, Richard Guenther wrote:

> >> --- 348,367 ----
> >> Â Â Â Â Â Â Â Â Â Â Â Â Â Âbool insert_at_next_slot_p)
> >> Â {
> >> Â Â void **slot;
> >> Â Â unsigned ix;
> >> Â Â bool existed_p;
> >>
> >> Â Â gcc_assert (t);
> >>
> >> ! Â slot = pointer_map_insert (cache->node_map, t);
> >> ! Â if (!*slot)
> >
> > ix might legitimately be zero. ÂHence this transformation is not
> > equivalent. ÂYou might want to enter ix+1 into the cache with the
> > appropriate adjustment at read-out. ÂSame for the other places.
> 
> Or not use index zero.

I never like these sentinals.

> Maybe better than also have to deal with ix + 1 wrapping ...

We don't handle ix wrapping, why should we now suddenly care about ix+1 
wrapping?


Ciao,
Michael.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]