Dead-code elimination can't remove string copy insns?
law@redhat.com
law@redhat.com
Tue May 13 18:02:00 GMT 2003
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
More information about the Gcc
mailing list