This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: document edge flags
- To: Richard Henderson <rth at redhat dot com>, Jan Hubicka <jh at suse dot cz>,gcc-patches at gcc dot gnu dot org
- Subject: Re: document edge flags
- From: Zack Weinberg <zack at codesourcery dot com>
- Date: Mon, 5 Nov 2001 00:03:17 -0800
- References: <20011030144119.B30945@atrey.karlin.mff.cuni.cz> <20011030074203.J28319@codesourcery.com> <20011104231349.B17976@redhat.com>
On Sun, Nov 04, 2001 at 11:13:49PM -0800, Richard Henderson wrote:
> On Tue, Oct 30, 2001 at 07:42:03AM -0800, Zack Weinberg wrote:
> > /* EDGE_FALLTHRU indicates an edge without a corresponding jump
> > instruction. In the final assembly output, the two basic blocks
> > connected by this edge will appear one after another. */
>
> Not completely true. A conditional jump generates one fallthru
> edge and one normal edge.
I was trying to express that no jump instruction is executed if
control traverses a fallthru edge. (With a failing conditional jump
being considered as not executed.) Maybe it's better to say
... indicates an edge which will be traversed by normal advancement
of the PC; the processor does not execute a jump.
> > /* EDGE_ABNORMAL marks edges which do not come from a jump instruction.
> > Such edges cannot be redirected. */
>
> Not completely true. Indirect jumps (computed goto) are abnormal
> because we don't know how the destination address was computed, so
> we cannot adjust that computation, so we cannot redirect the edge.
Ah, terminology confusion. How about
/* EDGE_ABNORMAL edges cannot be redirected. For instance, computed
'goto' produces abnormal edges, since the compiler does not know
how to adjust the calculation of the destination address. */
> sibling call == tail cail. Use one phrase or the other
> but not both.
I tend to think of them as distinct. Tail call is when we optimize a
recursive call to the current function into a branch; sibling call is
when we turn a call to a different function with the same signature
into a branch.
> > /* EDGE_EH marks an edge from a (possibly) trapping instruction to the
> > exception handler. This includes calls to functions that may throw
> > exceptions. */
>
> I don't believe we should have EDGE_EH from a non-trapping insn.
Does this mean that if you write
try {
a();
} catch (...) { /* stuff */ }
and a may throw, there is no EDGE_EH edge from a to the catch block?
zw