This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Code motion around labels
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Subject: Re: Code motion around labels
- From: Richard Henderson <rth at redhat dot com>
- Date: Fri, 13 Apr 2001 15:22:17 -0700
- Cc: law at redhat dot com, gcc at gcc dot gnu dot org
- References: <10104132128.AA18847@vlsi1.ultra.nyu.edu>
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~