OSDN Git Service

* tree-cfg.c (stmt_starts_bb_p): Clean up by replacing code
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Mar 2005 14:29:00 +0000 (14:29 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Mar 2005 14:29:00 +0000 (14:29 +0000)
with LABEL_EXPR.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95831 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-cfg.c

index eb1ad10..d19e3b3 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-03  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * tree-cfg.c (stmt_starts_bb_p): Clean up by replacing code
+       with LABEL_EXPR.
+
 2005-03-03  Roger Sayle  <roger@eyesopen.com>
            Andrew Pinski  <pinskia@physics.uc.edu>
 
index 2ebc595..6ba0a02 100644 (file)
@@ -2650,8 +2650,6 @@ simple_goto_p (tree expr)
 static inline bool
 stmt_starts_bb_p (tree t, tree prev_t)
 {
-  enum tree_code code;
-
   if (t == NULL_TREE)
     return false;
 
@@ -2659,16 +2657,14 @@ stmt_starts_bb_p (tree t, tree prev_t)
      statement wasn't a label of the same type.  This prevents the
      creation of consecutive blocks that have nothing but a single
      label.  */
-  code = TREE_CODE (t);
-  if (code == LABEL_EXPR)
+  if (TREE_CODE (t) == LABEL_EXPR)
     {
       /* Nonlocal and computed GOTO targets always start a new block.  */
-      if (code == LABEL_EXPR
-         && (DECL_NONLOCAL (LABEL_EXPR_LABEL (t))
-             || FORCED_LABEL (LABEL_EXPR_LABEL (t))))
+      if (DECL_NONLOCAL (LABEL_EXPR_LABEL (t))
+         || FORCED_LABEL (LABEL_EXPR_LABEL (t)))
        return true;
 
-      if (prev_t && TREE_CODE (prev_t) == code)
+      if (prev_t && TREE_CODE (prev_t) == LABEL_EXPR)
        {
          if (DECL_NONLOCAL (LABEL_EXPR_LABEL (prev_t)))
            return true;