PATCH: Speed up darwin.c

Mark Mitchell mark@codesourcery.com
Sat Jul 24 19:06:00 GMT 2004


Mike Stump wrote:

> On Thursday, July 22, 2004, at 09:38  PM, Mark Mitchell wrote:
>
>> This patch eliminates the quadratic identifier searching stuff in
>> darwin.c and the associated:
>>
>> !           /* FIXME: This breaks the identifier hash table.  */
>> !           IDENTIFIER_NODE_CHECK (TREE_VALUE (temp))->identifier.id.str
>> !         = (unsigned char *) name;
>>
>> bits.
>
>
> Thanks.  I gave this a quick once over, and it looks ok.  The biggest 
> thing that I think might be able to be fixed is the hash table you added.

Yes.  The only reason this is necessary is that when the stub/non-lazy 
pointer is marked as referenced we need to go back and mark the original 
thing as referenced as well.  It maybe that this never happens, or could 
be accomplished in another way.  However, this change effectively 
dropped all of this stuff completely off the profile, so I'm not 
terribly worried about it at the moment.

I would not be amazed if I failed to find some corner case that needs to 
be dealt with somewhere, although I did the obvious tests + DejaGNU.  If 
you find something, please let me know.

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com



More information about the Gcc-patches mailing list