[partial backport from gcc-4.8/trunk r188667 ] Date: Tue, 29 May 2012 13:59:24 +0200 (CEST) From: Michael Matz Subject: Re: RFA: Speedup expand_used_vars by 30 times (PR38474) List-Archive: Hi, On Tue, 29 May 2012, Richard Guenther wrote: > > The other change in function.c further improves the temp slot > > machinery. While expanding free_temp_slots is called after each > > statement, and if it is able to free a slot it needs to update the > > RTX->slot mapping (a htab_t).  The freeing of slots was done > > incorrectly, it overwrote the slot in question with NULL, but it > > should have used htab_clear_slot. > > That looks like a bugfix applicable to branches? Perhaps, though the results of this bug are only worse code generation. When the chains are broken due to the bug some RTX->slot mappings aren't found anymore, but the code deals conservatively with that. gcc/ 2012-06-15 Michael Matz PR middle-end/38474 * function.c (remove_unused_temp_slot_addresses_1): Use htab_clear_slot. --- gcc-4.7.1/gcc/function.c.~1~ 2012-05-12 23:37:23.000000000 +0200 +++ gcc-4.7.1/gcc/function.c 2012-06-24 13:06:05.000000000 +0200 @@ -709,7 +709,7 @@ remove_unused_temp_slot_addresses_1 (voi const struct temp_slot_address_entry *t; t = (const struct temp_slot_address_entry *) *slot; if (! t->temp_slot->in_use) - *slot = NULL; + htab_clear_slot (temp_slot_address_table, slot); return 1; }