This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Put scope blocks on a diet
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jan Hubicka" <hubicka at ucw dot cz>
- Cc: "Alexandre Oliva" <aoliva at redhat dot com>, "Jan Hubicka" <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org, "Mark Mitchell" <mark at codesourcery dot com>
- Date: Tue, 27 Nov 2007 14:20:30 +0100
- Subject: Re: Put scope blocks on a diet
- References: <orlkcucny9.fsf@oliva.athome.lsd.ic.unicamp.br> <20070806201102.GF4460@kam.mff.cuni.cz> <orprzw2kuk.fsf@free.oliva.athome.lsd.ic.unicamp.br> <orprznl6tl.fsf@free.oliva.athome.lsd.ic.unicamp.br> <20071010084624.GA19060@atrey.karlin.mff.cuni.cz> <orzlyqjhq1.fsf@free.oliva.athome.lsd.ic.unicamp.br> <84fc9c000710110138i7e541407p26ff63fbcc76028a@mail.gmail.com> <20071011221238.GN20381@kam.mff.cuni.cz> <orir5dglqw.fsf@free.oliva.athome.lsd.ic.unicamp.br> <20071012061351.GA11752@atrey.karlin.mff.cuni.cz>
On Oct 12, 2007 7:13 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > On Oct 11, 2007, Jan Hubicka <jh@suse.cz> wrote:
> >
> > >> + /* Removing declarations before inlining is going to affect
> > >> + DECL_UID that in turn is going to affect hashtables and
> > >> + code generation. */
> > >> + || !cfun->after_inlining)
> >
> > > Actually I think your proposed patch (modulo the asserts) is identical
> > > to one I sent in August, or did I missed something trivial?
> >
> > The difference is that my patch sets "unused = false;" when we refrain
> > from removing an unused variable for the sake of debug info.
> >
> > Without it, we may remove a leaf block that still contains
> > declarations, and this causes differences in declaration numbers for
> > inlining, although I don't have a testcase that shows the problem
> > except in the vta branch.
>
> Uh, thanks, I didin't noticed that.
> Honza
>
> >
> > > I tought that one is already on your branch and just waiting for
> > > approval to mainline.
> >
> > Yes, but I'm now convinced it is wrong, for it will unintentionally
> > remove declarations of unused variables before inlining by removing
> > their containing blocks, and this may result in different code *and*
> > harm debug info.
With
2007-11-26 Alexandre Oliva <aoliva@redhat.com>, Jan Hubicka <jh@suse.cz>
* tree-ssa-live.c (remove_unused_scope_block_p): Drop
declarations and blocks only after inlining. Check that
non-empty blocks are not dropped.
* tree-inline.c (expand_call_inline): Check that functions are
not inlined too late.
there is a 50% increase in memory consumption and a 5% increase in
compile-time for tramp3d.
I don't think this is acceptable. Please revert the patch given that we are
late in stage3.
Thanks,
Richard.