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] Small cleanup for tree-complex.c


Hi,

We don't need labels and gotos when we have the CFG.

Can't bootstrap right now, apparently due to a merge probel.
But is this OK once I have bootstrapped&tested this?

Gr.
Steven

	* tree-complex.c (expand_complex_div_wide): Don't add labels
	and gotos to the newly created basic blocks.

Index: tree-complex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-complex.c,v
retrieving revision 1.1.2.6
diff -c -3 -p -r1.1.2.6 tree-complex.c
*** tree-complex.c	18 Jan 2004 07:23:21 -0000	1.1.2.6
--- tree-complex.c	5 Mar 2004 09:28:36 -0000
*************** expand_complex_div_wide (block_stmt_iter
*** 241,260 ****
    else
      {
        basic_block bb_cond, bb_true, bb_false, bb_join;
-       tree l1, l2, l3;
        edge e;
  
-       l1 = create_artificial_label ();
-       t1 = build (GOTO_EXPR, void_type_node, l1);
-       l2 = create_artificial_label ();
-       t2 = build (GOTO_EXPR, void_type_node, l2);
        cond = build (COND_EXPR, void_type_node, cond, t1, t2);
        bsi_insert_before (bsi, cond, BSI_SAME_STMT);
  
-       min = make_temp (inner_type);
-       max = make_temp (inner_type);
-       l3 = create_artificial_label ();
- 
        /* Split the original block, and create the TRUE and FALSE blocks.  */
        e = split_block (bsi->bb, cond);
        bb_cond = e->src;
--- 241,251 ----
*************** expand_complex_div_wide (block_stmt_iter
*** 277,286 ****
            set_immediate_dominator (CDI_DOMINATORS, bb_false, bb_cond);
          }
  
        /* Compute min and max for TRUE block.  */
        *bsi = bsi_start (bb_true);
-       t1 = build (LABEL_EXPR, void_type_node, l1);
-       bsi_insert_after (bsi, t1, BSI_NEW_STMT);
        t1 = build (MODIFY_EXPR, inner_type, min, br);
        bsi_insert_after (bsi, t1, BSI_NEW_STMT);
        t1 = build (MODIFY_EXPR, inner_type, max, bi);
--- 268,278 ----
            set_immediate_dominator (CDI_DOMINATORS, bb_false, bb_cond);
          }
  
+       min = make_temp (inner_type);
+       max = make_temp (inner_type);
+ 
        /* Compute min and max for TRUE block.  */
        *bsi = bsi_start (bb_true);
        t1 = build (MODIFY_EXPR, inner_type, min, br);
        bsi_insert_after (bsi, t1, BSI_NEW_STMT);
        t1 = build (MODIFY_EXPR, inner_type, max, bi);
*************** expand_complex_div_wide (block_stmt_iter
*** 288,304 ****
  
        /* Compute min and max for FALSE block.  */
        *bsi = bsi_start (bb_false);
-       t1 = build (LABEL_EXPR, void_type_node, l2);
-       bsi_insert_after (bsi, t1, BSI_NEW_STMT);
        t1 = build (MODIFY_EXPR, inner_type, min, bi);
        bsi_insert_after (bsi, t1, BSI_NEW_STMT);
        t1 = build (MODIFY_EXPR, inner_type, max, br);
        bsi_insert_after (bsi, t1, BSI_NEW_STMT);
  
!       /* Insert the join label into the tail of the original block.  */
        *bsi = bsi_start (bb_join);
-       t1 = build (LABEL_EXPR, void_type_node, l3);
-       bsi_insert_before (bsi, t1, BSI_SAME_STMT);
      }
    
    /* Now we have MIN(|br|, |bi|) and MAX(|br|, |bi|).  We now use the
--- 280,292 ----
  
        /* Compute min and max for FALSE block.  */
        *bsi = bsi_start (bb_false);
        t1 = build (MODIFY_EXPR, inner_type, min, bi);
        bsi_insert_after (bsi, t1, BSI_NEW_STMT);
        t1 = build (MODIFY_EXPR, inner_type, max, br);
        bsi_insert_after (bsi, t1, BSI_NEW_STMT);
  
!       /* Insert the rest of the code into the original block.  */
        *bsi = bsi_start (bb_join);
      }
    
    /* Now we have MIN(|br|, |bi|) and MAX(|br|, |bi|).  We now use the


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