[rtlopt] bug fix - split_edge

Josef Zlomek zlomj9am@artax.karlin.mff.cuni.cz
Sat Nov 30 14:05:00 GMT 2002


Hello,

this patch sets the loop_depth of the newly created block while splitting
edge.

Honza, maybe this patch is needed for other branches too.

Bootstrapped i386.

Josef


Thu Nov 28 19:51:20 CET 2002  Josef Zlomek <zlomj9am@artax.karlin.mff.cuni.cz>

	* cfgrtl.c (split_edge): Set loop_depth of created basic block.

Index: gcc/cfgrtl.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cfgrtl.c,v
retrieving revision 1.58.4.3
diff -u -c -3 -p -r1.58.4.3 cfgrtl.c
*** gcc/cfgrtl.c	21 Nov 2002 14:26:37 -0000	1.58.4.3
--- gcc/cfgrtl.c	28 Nov 2002 18:06:34 -0000
*************** split_edge (edge_in)
*** 1274,1279 ****
--- 1274,1280 ----
    bb = create_basic_block (before, NULL, edge_in->dest->prev_bb);
    bb->count = edge_in->count;
    bb->frequency = EDGE_FREQUENCY (edge_in);
+   bb->loop_depth = MIN (edge_in->src->loop_depth, edge_in->dest->loop_depth);
  
    /* ??? This info is likely going to be out of date very soon.  */
    if (edge_in->dest->global_live_at_start)



More information about the Gcc-patches mailing list