This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Improved use of TREE_SYMBOL_REFERENCED in the C++ front end


On Thu, Oct 31, 2002 at 10:18:57AM -0800, Matt Austern wrote:
> On Thursday, October 31, 2002, at 10:03 AM, Mark Mitchell wrote:
> >You just need to find the places we call assemble_name and pass in a
> >DECL, when there is one to be had.  What that really means, is finding
> >the places where SYMBOL_REFs are created and pass in a DECL, where
> >appropriate.  This is one of those things that will end up being a big,
> >but largely mechanical, patch.  You don't have to set the DECL field
> >in the SYMBOL_REF everywher possible -- just everywhere that you need
> >the call back to occur.  That may just be make_decl_rtl.

I've been thinking for a while that expanding a 
SYMBOL_REF to contain a pointer back to the DECL
would be a Very Good Thing.

> Something I didn't mention in my previous message is that if
> we're going to put a callback in the macro that sets the
> referenced bit, the first step is to create that macro!  That is,
> the first step is to (1) change TREE_SYMBOL_REFERENCED
> so that it returns an rvalue; (2) create a new macro,
> TREE_SET_SYMBOL_REFERENCED; and (3) change every
> place in the compiler that uses TREE_SYMBOL_REFERENCED
> in an lvaluish way so that it uses the new SET macro instead.

I don't think it's worth creating a new macro.  Using a langhook
directly should be sufficient for the set.  Part 1 is still 
valuable though.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]