[tree-ssa] Patch ping

Andrew MacLeod amacleod@redhat.com
Wed Dec 3 21:13:00 GMT 2003


On Wed, 2003-12-03 at 15:10, Richard Henderson wrote:
> On Wed, Dec 03, 2003 at 11:30:13AM -0500, Andrew MacLeod wrote:
> > bool
> > cleanup_cond_expr_graph (basic_block bb, block_stmt_iterator bsi)
> > {
> >  <...>
> >   if (taken_edge->flags & EDGE_TRUE_VALUE)
> >     bsi_replace (&bsi, COND_EXPR_THEN (cond_expr), false);
> >   else if (taken_edge->flags & EDGE_FALSE_VALUE)
> >     bsi_replace (&bsi, COND_EXPR_ELSE (cond_expr), false);
> >   else
> >     abort ();
> 
> This, incidentally, is a bug.  We *cannot* use bsi_replace here.

I had to do a double take on it too, but its replacing the stmt at bsi,
which is a COND_EXPR with one of the GOTO's from the arms. Since that is
suppose to just be a tree, it should in theory work I think, but it is
unpleasant to me :-) Thats why I used it as an example.

However, this is just the sort of abuse of GOTO's on the arms I would
like to see removed.. I'd like us to act as if those GOTOs arent there
at all. 

Andrew



More information about the Gcc-patches mailing list