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]

[tree-ssa] EH CFG cleanup patch #2



This removes the bogus edge from the various EH nodes to their successor
blocks.  The edges are now unnecessary now that we don't allow the 
LHS of a MODIFY_EXPR which may throw to be a user variable.

These edges were giving Jeff Strum & Andrew fits for various reasons I
never bothered to try and understand (knowing that the edges were going
to disappear).  Guys -- the problem edges are gone...  Don't blame me
for the problems anymore :-) :-)

Removing these edges also helps improve compile time for C++ codes.  For
example, FieldCentering from POOMA improves by about 7%.  Not spectacular,
but I'll take it.

I've got at least one more EH CFG cleanup patch in the queue.  Specifically,
we've got too many edges leaving the TRY blocks in TRY_FINALLY_EXPRs and
I've got some preliminary code to remove those unwanted edges, which 
further reduces the size of the CFG and can improve compile times even
further.

	* tree-cfg.c (make_ctrl_stmt_edges): Do not create bogus edges
	to the successor block of TRY_CATCH_EXPR, TRY_FINALLY_EXPR,
	CATCH_EXPR or EH_FILTER_EXPR nodes.

Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.112
diff -c -3 -p -r1.1.4.112 tree-cfg.c
*** tree-cfg.c	20 Jun 2003 05:52:12 -0000	1.1.4.112
--- tree-cfg.c	20 Jun 2003 08:07:06 -0000
*************** make_ctrl_stmt_edges (basic_block bb)
*** 1115,1121 ****
        /* FALLTHRU */
      case TRY_CATCH_EXPR:
        make_edge (bb, bb_for_stmt (TREE_OPERAND (last, 0)), EDGE_FALLTHRU);
-       make_edge (bb, successor_block (bb), EDGE_FALLTHRU);
  
        /* Make an edge to the next cleanup if applicable.  */
        if (stmt_ann (last)->reachable_exception_handlers)
--- 1115,1120 ----
*************** make_ctrl_stmt_edges (basic_block bb)
*** 1129,1140 ****
  
      case CATCH_EXPR:
        make_edge (bb, bb_for_stmt (CATCH_BODY (last)), EDGE_FALLTHRU);
-       make_edge (bb, successor_block (bb), EDGE_FALLTHRU);
        break;
  
      case EH_FILTER_EXPR:
        make_edge (bb, bb_for_stmt (EH_FILTER_FAILURE (last)), EDGE_FALLTHRU);
-       make_edge (bb, successor_block (bb), EDGE_FALLTHRU);
        break;
  
      default:
--- 1128,1137 ----
















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