This is the mail archive of the gcc-patches@gcc.gnu.org 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 <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.

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


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