This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Deal with local static same way as we deal with global static for IPA
- From: Jan Hubicka <jh at suse dot cz>
- To: Richard Henderson <rth at redhat dot com>, Jan Hubicka <jh at suse dot cz>,gcc-patches at gcc dot gnu dot org, jason at redhat dot com, zadeck at naturalbridge dot com
- Date: Wed, 8 Jun 2005 11:02:51 +0200
- Subject: Re: Deal with local static same way as we deal with global static for IPA
- References: <20050607201159.GW11634@kam.mff.cuni.cz> <20050608011126.GA24061@redhat.com>
> 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~