Put scope blocks on a diet

Jan Hubicka hubicka@ucw.cz
Fri Oct 12 06:14:00 GMT 2007


> 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.
> 
> -- 
> Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
> FSF Latin America Board Member         http://www.fsfla.org/
> Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
> Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}



More information about the Gcc-patches mailing list