Put scope blocks on a diet

Alexandre Oliva aoliva@redhat.com
Wed Oct 10 08:20:00 GMT 2007


On Oct  3, 2007, Alexandre Oliva <aoliva@redhat.com> wrote:

> On Aug  6, 2007, Jan Hubicka <jh@suse.cz> wrote:

>> It prevents the removal before
>> inlining so UIDs should remain the same.

> This patch of yours (except for the ChangeLog entry) fixes the
> -g-changes-generated-code in the trunk, so this should go in.

> However, it breaks the vta branch, because we still keep debug
> annotations for variables in blocks that your patch removes.  I
> suppose I could just drop such annotations in the floor for now, but,
> in the long run, should I?

I did this, but then I wonder...  How come the differences in decl
uids arise from inlining of removed variables, if the patch was
supposed to take effect only after inlining?

As it turns out, looking at the code, I get the impression that
cfun->after_inline determines whether the function was inlined into,
rather than whether it has already been inlined into every point it
would be throughout the current compilation.  Is this not so?

If it is, then the test is meaningless.  The problem arises when we
change the declarations in a function's logical blocks and then inline
into others.

What am I missing?

-- 
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