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] Fix one of PPC bootstrap problems


> On Sat, 2003-09-06 at 17:15, Jan Hubicka wrote:
> > Mark,
> > PPC runs into problem because C++ frontend several times finalize the
> > same variable.  It changes the mind from normal variable into comdat
> > in between first and second time.  I am not quite sure why that happens,
> > but surely we should not re-do everything over and over.
> 
> You need to create a macro to encapsulate the common code that you
> added.
> 
> Your check is not as correct as it could be.  In particular, you check
> TREE_ASM_WRITTEN in the flag_unit_at_a_time_case; you should not have to
> do that.
> 
> The point is that TREE_ASM_WRITTEN was used to check "was this vtable
> sent off to the middle end?"  Your unit-at-a-time stuff means that
> TREE_ASM_WRITTEN is no longer the way to write that check; instead, you
> want to check:
> 
>   flag_unit_at_a_time ? cgraph (...)->finalized : TREE_ASM_WRITTEN (...)
> 
> Please package that up into a macro -- I suggested the name
> VAR_FINALIZED_P, and use it in place of the tests that you added.

OK, I will add the macro tomorrow.  I hope to be able to avoid
TREE_ASM_WRITTEN checks completely and make everything to go trought
cgraph code, in unit at a time or not.  I already have this done for C
and have working patch for C++ but I want to clean up thinks a bit
somewhat.  It allows me to remove some of redundant logic about
scheduling of expansion of inline functions out of frontends and
commonize inlining heuristics code so hope that by the end of week the
macro will be just cgraph_varpool_node (...)->finalized.

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


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