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]

Re: Code motion around labels


On Fri, Apr 13, 2001 at 05:28:41PM -0400, Richard Kenner wrote:
>     Because if the labels are important from a code motion standpoint,
>     it should be reflected in the CFG, which is what drives the dataflow
>     analysis used by code motion.
> 
> Well I don't see anyplace where it consults the CFG either, nor am I sure
> how you'd encode the restriction in the CFG.  What did you mean?

A label that is significant from a code motion standpoint
will be a CODE_LABEL, and will begin a new basic block.
There will be an incomming edge from somewhere showing 
from whence it is reachable.

A label that is not significant wrt code motion (e.g. it
was never used at all but retained for debugging, or it
had its address taken but was never the target of a branch)
is transformed to a NOTE_INSN_DELETED_LABEL, which is *not*
pinned to some specific location in the instruction stream.
It would be possible to try harder to keep it closer to its
original location, but why bother?


r~


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