This is the mail archive of the gcc-patches@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: document edge flags


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


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