Avoid DIE freeing overhead

Geoffrey Keating geoffk@apple.com
Tue Apr 18 06:23:00 GMT 2006


On 17/04/2006, at 8:19 PM, DJ Delorie wrote:

>
>> +	    slot = htab_find_slot_with_hash (debug_str_hash, s->str,
>> +					     htab_hash_string (s->str),
>> +					     INSERT);
>> +	    gcc_assert (*slot == NULL);
>
> My m32c-elf newlib builds are crashing at that assert, on an amd64
> linux host.

Try this:

@@ -13802,9 +13777,8 @@
         s->refcount++;
         /* Avoid unnecessarily putting strings that are used less than
            twice in the hash table.  */
-       if (s->refcount == 2
-           || (s->refcount == 1
-               && (DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) != 0))
+       if (s->refcount
+           == ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) ? 1 : 2))
           {
             void ** slot;
             slot = htab_find_slot_with_hash (debug_str_hash, s->str,

Let me know if it works.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2408 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060418/1e8a1a89/attachment.p7s>


More information about the Gcc-patches mailing list