This is the mail archive of the gcc-patches@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: [C++ patch] PR C++/12574


On Wed, 2003-10-15 at 13:38, Jan Hubicka wrote:
> > On Tue, 2003-10-14 at 12:41, Jan Hubicka wrote:
> > > > On Tue, 2003-10-14 at 09:20, Jan Hubicka wrote:
> > > > > > On Tue, 2003-10-14 at 01:46, Jan Hubicka wrote:
> > > > > > > Hi,
> > > > > > > the testcase shows that there is yet another way to reffer to functiona
> > > > > > > ddress using baselink expression.  I am not quite sure I deal with all
> > > > > > > cases correctly as perhaps I should do something about TEMPLATE_DECL and
> > > > > > > OVERLOAD too.  Mark?
> > > > > > 
> > > > > > I think that if this patch is necessary something else is wrong.
> > > > > > 
> > > > > > First, the language-specific tree code is BASELINK, not ADDR_EXPR.  So,
> > > > > 
> > > > > OK, can BASELINK appear in other context than ADDR_EXPR too, for
> > > > > instance to represent direct call?
> > > > 
> > > > Don't know -- but cxx_callgraph_expr should be parallel to
> > > > cxx_expand_expr.  That's the canonical source of front-end specific tree
> > > > nodes that can be seen by the middle end.
> > > 
> > > Hi,
> > > the attached patch also appears to work.  It would lose in case BASELINK
> > > may appear inside CALL_EXPR, but we would just miss optimization.  OK?
> > 
> > The other code in that function doesn't check flag_unit_at_a_time; why
> > does this new version do so?
> 
> Hmm, because I originally added the check only into cgraphunit.c and
> forgot about this instance.
> Basically in non-unit-at-a-time we don't need to mark the function as
> needed as we will notice it anyway when expanding it's name and save
> effort in case the reference has been optimized out.
> 
> Would it be OK with the flag_unit_at_a_time check moved to the top of
> switch statement?

OK.

-- 
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC


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