This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Put scope blocks on a diet

On Oct 11, 2007, Jan Hubicka <> 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.

> 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
FSF Latin America Board Member
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]