[patch] tree-if-conv.c: Don't handle GOTO_EXPR.

Kazu Hirata kazu@cs.umass.edu
Wed May 11 15:38:00 GMT 2005


Hi,

Attached is a patch to not to handle GOTO_EXPR.

I don't think if-conv handles computed gotos.  Devang suggested to
remove the handling of GOTO_EXPR in tree-if-conv.c.

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-05-11  Kazu Hirata  <kazu@cs.umass.edu>

	PR tree-optimizer/18472
	* tree-if-conv.c (tree_if_convert_stmt,
	if_convertible_modify_expr_p): Don't handle GOTO_EXPR.

Index: tree-if-conv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-if-conv.c,v
retrieving revision 2.40
diff -u -d -p -r2.40 tree-if-conv.c
--- tree-if-conv.c	3 May 2005 21:47:31 -0000	2.40
+++ tree-if-conv.c	10 May 2005 20:50:07 -0000
@@ -241,13 +241,6 @@ tree_if_convert_stmt (struct loop *  loo
 	 program.  */
       break;
 
-    case GOTO_EXPR:
-      /* Unconditional goto */
-      add_to_predicate_list (bb_for_stmt (TREE_OPERAND (t, 1)), cond);
-      bsi_remove (bsi);
-      cond = NULL_TREE;
-      break;
-
     case COND_EXPR:
       /* Update destination blocks' predicate list and remove this
 	 condition expression.  */
@@ -401,7 +394,7 @@ if_convertible_modify_expr_p (struct loo
 /* Return true, iff STMT is if-convertible.
    Statement is if-convertible if,
    - It is if-convertible MODIFY_EXPR
-   - IT is LABEL_EXPR, GOTO_EXPR or COND_EXPR.
+   - IT is LABEL_EXPR or COND_EXPR.
    STMT is inside block BB, which is inside loop LOOP.  */
 
 static bool
@@ -418,7 +411,6 @@ if_convertible_stmt_p (struct loop *loop
 	return false;
       break;
 
-    case GOTO_EXPR:
     case COND_EXPR:
       break;
 



More information about the Gcc-patches mailing list