This is the mail archive of the gcc@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: Dead-code elimination can't remove string copy insns?


In message <1052848240.27232.407.camel@frodo.toronto.redhat.com>, Diego Novillo
 writes:
 >On Tue, 2003-05-13 at 13:38, law@redhat.com wrote:
 >
 >> Does this look better? :-)
 >> 
 >Much :)
 >
 >Now, if we could also get rid of those pesky labels.  You mentioned
 >something about that, but I forget what.
Well, it's simply a matter of building a use count for the labels.  As
we remove GOTO_EXPRs we decrement the count.  If the count goes to zero
and the label is not special (such as the target of a nonlocal goto), then
the label is unused and can be eliminated.

There's nothing particularly tricky here except that we want to build
those use counts efficiently.  Meaning we don't want a separate walk
over the tree structures merely to build the use counts.

It's on the TODO, but it hasn't bubbled up to the top yet.  Removal
of unused variables is a much bigger win as far as compilation time
is concerned.



Jeff




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