target/6569: sparc-sun-solaris2.7 C testsuite regression in compile/20011119-2.c

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Tue May 7 12:58:00 GMT 2002


At 21:37 07.05.2002, Mark Mitchell wrote:


>--On Tuesday, May 07, 2002 09:32:50 PM +0200 Franz Sirl 
><Franz.Sirl-kernel@lauterbach.com> wrote:
>
>>OK, here is a much better patch, instead of trying to figure out the
>>right flags to test, I created a second list WEAK_EMITTED_DECLS and add
>>all emitted weaks in globalize_decl() to it. Then in weak_finish() it's
>>very easy to check for it.
>
>Ack, our patches are fighting.

Heh.


>>Besides being easier to grok, it's also faster, cause we avoid to walk
>>the WEAK_DECLS list on every declare_weak() call.
>
>Yours will now be quadratic at weak_finish time.  We really ought to be
>using hash tables for these things, but for now we can get by.

Yeah, but will there really be a lot of not emitted weaks be left on 
WEAK_DECLS at weak_finish time? I suppose that globalize_decl will only 
miss to remove "manual" weaks from WEAK_DECLS, not the ones created by C++? 
And even for manual usage only a few cases are affected at all.

BTW, one thing I noticed, platforms without ASM_OUTPUT_DEF defined won't 
call globalize_decl from assemble_alias at all, thus all weak emitting may 
be duplicated there. But this is unrelated to our current problem.

>I'm not sure whether your patch or mine is better, but I think I prefer
>mind on the grounds that it eliminates the references to the wrong DECLs
>sooner.  DECLs take up lots of space, and we want to return them to the
>collector.
>
>Thoughts?

Your patch?

Franz.



More information about the Gcc-bugs mailing list