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: Deal with local static same way as we deal with global static for IPA


> On Tue, Jun 07, 2005 at 10:11:59PM +0200, Jan Hubicka wrote:
> > ! 	/* FIXME: tree-inline.c duplicates static declarations during copying
> > ! 	   BIND_EXPR_VARS list (so they can be chained by TREE_CHAIN) while
> > ! 	   other occurences are still shared (as static variables
> > ! 	   are shared), so we need to look for the origin here.  Kill it
> > ! 	   once this is cleaned up.  */
> > ! 	cgraph_varpool_finalize_decl (DECL_ORIGIN (decl));
> 
> I think I'd rather you fix this first, rather than put this hack in.

I don't see how to do that easilly - the BIND_EXPRs are linked via
TREE_CHAIN pointers and we need the local static in two BIND_EXPRs at
once, but we have only one link pointer.
One sollution I saw was to make C++ frontend lower function before
clonning (so we don't clone at generic level at all).  I got half way
throught my way across C++ frontend, I might try to finish it if this
plan sounds sane, but I would preffer doing so incrementally.

Honza
> 
> The rest of it seems ok.
> 
> 
> r~


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