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]
Other format: [Raw text]

Re: [tree-ssa] Gimplifying Java


In message <1055542985.21330.238.camel@frodo.toronto.redhat.com>, Diego Novillo
 writes:
 >On Fri, 2003-06-13 at 18:10, Jeff Sturm wrote:
 >
 >> --- tree-cfg.c	12 Jun 2003 04:36:20 -0000	1.1.4.105
 >> +++ tree-cfg.c	13 Jun 2003 22:00:01 -0000
 >> @@ -1080,25 +1080,23 @@ make_ctrl_stmt_edges (basic_block bb)
 >>        /* FALL THROUGH */
 >>      case TRY_CATCH_EXPR:
 >>        {
 >>  	basic_block target_bb = bb_for_stmt (TREE_OPERAND (last, 0));
 >> 
 >>  	if (target_bb)
 >>            make_edge (bb, target_bb, EDGE_FALLTHRU);
 >> -	make_edge (bb, successor_block (bb), EDGE_FALLTHRU);
 >>  	break;
 >>        }
 >> 
 >>      case CATCH_EXPR:
 >>        {
 >>  	basic_block target_bb = bb_for_stmt (CATCH_BODY (last));
 >> 
 >>  	if (target_bb)
 >>  	  make_edge (bb, target_bb, EDGE_FALLTHRU);
 >> -	make_edge (bb, successor_block (bb), EDGE_FALLTHRU);
 >>  	break;
 >>        }
 >> 
 >>      case EH_FILTER_EXPR:
 >>        {
 >>  	basic_block target_bb = bb_for_stmt (EH_FILTER_FAILURE (last));
 >> 
 >This hunk looks OK to me, but I didn't implement try/catch support in
 >the flowgraph and Jeff was cleaning up code around this area, so he may
 >have changed things.
 >
 >It's related to what I was asking Jeff Law yesterday about this.  The
 >idea of the flowgraph builder has always been to allow the blocks inside
 >a control structure to build its edges out of if.  I was a bit confused
 >that we were creating fallthru edges  from the entry block of a
 >try/catch here.  Jeff posted today that he was cleaning things up here,
 >so he may have fixed it already.  Jeff?
You can't make that change, at least not without some other fixes.

See my last message titled "Fun with exceptions".  You'll run into the
problem I discuss in that message if you remove those edges from the
CFG.

Removing that edge is definitely in my gun sights, but there's stuff
to do first.

I'm also going to be removing the if (target_bb) check shortly, which
(of course) requires another fix to remove code from the "empty statements
are shared" era.

So, basically if you're having issues in this code, you might want to 
watch my messages next week as it's about to go through a round of
cleanups.

jeff


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