This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] live analysis on local static functions
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: law at redhat dot com
- Cc: Jan Hubicka <jh at suse dot cz>, Richard Henderson <rth at redhat dot com>,Jan Hubicka <hubicka at ucw dot cz>, Andrew MacLeod <amacleod at redhat dot com>,gcc mailing list <gcc at gcc dot gnu dot org>,Diego Novillo <dnovillo at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 Oct 2003 18:53:01 +0200
- Subject: Re: [tree-ssa] live analysis on local static functions
- References: <20031017071926.GT6212@kam.mff.cuni.cz> <200310171553.h9HFr00J010528@speedy.slc.redhat.com>
> In message <20031017071926.GT6212@kam.mff.cuni.cz>, Jan Hubicka writes:
> >> > On Thu, Oct 16, 2003 at 09:36:44AM +0200, Jan Hubicka wrote:
> >> > > This is no fun. THere are number of functions in reload inlined becaus
> >e
> >> > > they are called once and apparently one of them kills datastructures
> >> > > (reload fails in the final sanity check on frame offsets to match again
> >> > > only on compiling large function - it is able to get trought half of
> >> > > stage3)
> >> >
> >> > Didn't you say you have a patch that makes things work again?
> >>
> >> I made patch to work around the unreferenced symbol problem (I am just
> >> testing more proper fix but it is equivaelnt in the functionality on C
> >> bootstrap), but still I get failures later in the process
> >> when I enable unit-at-a-time.
> >
> >Hi,
> >the attached patch seems to do the job for static variables. It bootstraps a
> >nd
> >pass testing with current tree-ssa snashot. With additional patch to re-enab
> >le
> >unit-at-a-time we get uninitialized variables warnings and when I get across
> >that genconstants of stage2 dies. This is new failure and I will try to look
> >into it unless someone beats me :)
> >
> >static inline char * test()
> >{
> > static char *a="";
> > return a;
> >}
> >char * q()
> >{
> >return test();
> >}
> >void main()
> >{
> > return 0;
> >}
> >
> >OK?
> >Honza
> >
> >Fri Oct 17 09:17:00 CEST 2003 Jan Hubicka <jh@suse.cz>
> > * tree-cfg.c (remove_useless_stmts_and_vars_bind): Deal properly with
> > local static variables.
> This is fine. Can you please check it in along with your testcase?
Sure. The testcase should go into usual compile/*magic or there is
special place to put ssa-branch specific tests? (I realize there is
gcc.dg/tree-ssa, but I guess it is just for those parsing the treessa
dumps, right?)
Thanks for introducing me into tree-* internals BTW:)
Honza