This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: darwin.c identifier-smashing
- From: Mike Stump <mrs at apple dot com>
- To: mark at codesourcery dot com
- Cc: geoffk at apple dot com, gcc at gcc dot gnu dot org
- Date: Fri, 9 Jul 2004 17:09:40 -0700
- Subject: Re: darwin.c identifier-smashing
On Friday, July 9, 2004, at 03:20 PM, Mark Mitchell wrote:
There's some quadratic behavior in darwin.c that needs fixing.
Yes. Some of it was fixed on the compile server branch a long time
ago. I'd recommend just pulling from there. Most of the stupidity of
the code can just go away, there isn't a good reason for it. People
were just confused.
The short answer is, once you cons up a custom name, you can use bits
(see DARWIN_STUB_OR_NON_LAZY_STUB_NEEDED) on that name to store
information, once you do that, searching is long longer necessary,
get_identifier does the searching if you will.
Additional good from the cs branch that is logically independent from
the compile server, mangling speedups, fewer generations of assembler
names... Improved template instantiation lookup, better specialization
lookups. Maybe even less generated trash during decl processing.
Below are the last set of patches that weren't checked into the cs
branch. In them you will find how the loop was removed, and what
replaced it. All the saving of state for restore_fragment for the cs
is independent from the work you'll be interested in, don't let it
dissuade you from pulling the other bits.
The testcases are fairly easy for all this stuff. Use an external
function, use a defined PUBLIC function, use an extern function, that
is then defined in the same unit after the use and so on... In all
cases, there should be no changes to the assembly after your changes.
I think a bootstrap is sufficient to test most of the functionality.
The exception may be, you can generate a stub, even if the routine is
in the translation unit, and use the stub, as the linker will `improve'
the code for you. The other option is to add the stub name to the
defined function, and not emit the stub. I can't recall which way each
source base does it offhand, either way can work as I recall.
You can call me and hit me up for more specific info and elaborations,
1 510 583 1180.
Attachment:
s.diffs.txt.gz
Description: GNU Zip compressed data