This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Lazy allocation of DECL_ASSEMBLER_NAME
Mark Mitchell <mark@codesourcery.com> writes:
> Yes, I mean the addresses of the trees. If that makes PCH unhappy,
> then we use DECL_UID. (Much though I think that wasting a word in
> every DECL for a UID when the address is *already* a UID is goofy.
> The EDG front end is a worked example demonstrating that you can use
> pointers as indices and still make PCH work by swizzling the pointers
> on the way in. We really should do that; it would allow us to save
> memory and would make PCH more robust.)
In fact I have a patch waiting for me to get time to finish it up,
which removes DECL_UID and TYPE_UID entirely with no noticeable ill
effect. There is *one* use of each in the 3.4 tree, and in both cases
pointer hashing is safe.
I'll be keeping the field itself around in mainline, because rth says
it's actually useful on tree-ssa somehow, although I hope that another
solution can be found.
zw