Hi,
On Mon, 2 May 2011, Jan Hubicka wrote:
> ! d_entry.base.from = t;
> ! slot = htab_find_slot (cache->node_map, &d_entry, INSERT);
> ! if (*slot == NULL)
> {
> /* Determine the next slot to use in the cache. */
> if (insert_at_next_slot_p)
> ix = VEC_length (tree, cache->nodes);
> else
> ix = *ix_p;
> !
> ! entry = (struct tree_int_map *)pool_alloc (cache->node_map_entries);
> ! entry->base.from = t;
> ! entry->to = ix;
> ! *slot = entry;
>
> lto_streamer_cache_add_to_node_array (cache, ix, t);
>
> --- 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.
Ciao,
Michael.