This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: the size of tree_decl
- From: law at redhat dot com
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: Dan Nicolaescu <dann at ics dot uci dot edu>, gcc at gcc dot gnu dot org
- Date: Wed, 12 Feb 2003 16:06:04 -0700
- Subject: Re: the size of tree_decl
- Reply-to: law at redhat dot com
In message <20030212224744.GB14744@daikokuya.co.uk>, Neil Booth writes:
>Dan Nicolaescu wrote:-
>
>> There's another field that is too big: location_t locus, it contains
>> a line number and a char*. If it was to use logical lines like cpplib
>> does, the char*
>
>That's the ultimate plan. Try doing for the whole compiler though.
>What a nightmare.
>
>Per was working on adding column info and still using just 32 bits.
>Sounded a bit tight to me. That's gone quiet.
What we do on the tree-ssa branch (where the locus is common to all nodes)
is have a pointer to external locus data, which can be shared across
nodes.
I wouldn't recommend this for the mainline tree though. tree-ssa has
an interesting requirement that location information be tied to exprs,
decls and other nodes. The alternative was to create expression nodes
to carry locus information around. After doing the algebra it was
pretty clear that we were better off with the locus pointer in tree_common
plus sharing rather than having lots of wrapper nodes carrying line
information.
jeff