cfg_layout_split_edge doesn't handle the general case correctly

James E Wilson wilson@specifixinc.com
Fri Aug 20 23:49:00 GMT 2004


On Fri, 2004-08-20 at 07:52, Mostafa Hagog wrote:
> This is wrong because if we have a fullthru edge going of a block next_bb
> must
> be the destination of that fallthru edge.

OK, this is helpful.  But you have left out info again.  Where is the
code that assumes that a fallthru edge must be the next block?  How does
this code fail when it isn't?

Just searching the code for uses of next_bb, I was able to find one
apparent counterexample.  In cfgrtl.c, function
force_nonfallthru_and_redirect, there is code
      /* When called from cfglayout, fallthru edges do not
         necessarily go to the next block.  */
      && e->src->next_bb == e->dest

I can find no info to support your claim.  The only thing I see is that
fallthru edges might not be optimized away if the dest block is not
src->next_bb.  However, it isn't clear that this is a problem.  This may
just be an intended consequence of some optimizations that reorder
blocks to improve performance.  I see nothing that would result in an
ICE.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com




More information about the Gcc mailing list