OSDN Git Service

* tree-cfg.c (tree_block_forwards_to): Remove.
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Oct 2004 23:31:04 +0000 (23:31 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Oct 2004 23:31:04 +0000 (23:31 +0000)
* tree-flow.h: Remove the corresponding prototype.

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

gcc/ChangeLog
gcc/tree-cfg.c
gcc/tree-flow.h

index 7f83e7e..ae614e4 100644 (file)
@@ -1,5 +1,10 @@
 2004-10-07  Kazu Hirata  <kazu@cs.umass.edu>
 
+       * tree-cfg.c (tree_block_forwards_to): Remove.
+       * tree-flow.h: Remove the corresponding prototype.
+
+2004-10-07  Kazu Hirata  <kazu@cs.umass.edu>
+
        * tree-flow-inline.h (phi_nodes): Remove an unnecessary check
        for ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR.
 
index 6a6da52..5aaad4a 100644 (file)
@@ -1843,69 +1843,6 @@ remove_bb (basic_block bb)
   remove_phi_nodes_and_edges_for_unreachable_block (bb);
 }
 
-
-/* Examine BB to determine if it is a forwarding block (a block which only
-   transfers control to a new destination).  If BB is a forwarding block,
-   then return the edge leading to the ultimate destination.  */
-
-edge
-tree_block_forwards_to (basic_block bb)
-{
-  block_stmt_iterator bsi;
-  bb_ann_t ann = bb_ann (bb);
-  tree stmt;
-
-  /* If this block is not forwardable, then avoid useless work.  */
-  if (! ann->forwardable)
-    return NULL;
-
-  /* Set this block to not be forwardable.  This prevents infinite loops since
-     any block currently under examination is considered non-forwardable.  */
-  ann->forwardable = 0;
-
-  /* No forwarding is possible if this block is a special block (ENTRY/EXIT),
-     this block has more than one successor, this block's single successor is
-     reached via an abnormal edge, this block has phi nodes, or this block's
-     single successor has phi nodes.  */
-  if (bb == EXIT_BLOCK_PTR
-      || bb == ENTRY_BLOCK_PTR
-      || EDGE_COUNT (bb->succs) != 1
-      || EDGE_SUCC (bb, 0)->dest == EXIT_BLOCK_PTR
-      || (EDGE_SUCC (bb, 0)->flags & EDGE_ABNORMAL) != 0
-      || phi_nodes (bb)
-      || phi_nodes (EDGE_SUCC (bb, 0)->dest))
-    return NULL;
-
-  /* Walk past any labels at the start of this block.  */
-  for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
-    {
-      stmt = bsi_stmt (bsi);
-      if (TREE_CODE (stmt) != LABEL_EXPR)
-       break;
-    }
-
-  /* If we reached the end of this block we may be able to optimize this
-     case.  */
-  if (bsi_end_p (bsi))
-    {
-      edge dest;
-
-      /* Recursive call to pick up chains of forwarding blocks.  */
-      dest = tree_block_forwards_to (EDGE_SUCC (bb, 0)->dest);
-
-      /* If none found, we forward to bb->succs[0] at minimum.  */
-      if (!dest)
-       dest = EDGE_SUCC (bb, 0);
-
-      ann->forwardable = 1;
-      return dest;
-    }
-
-  /* No forwarding possible.  */
-  return NULL;
-}
-
-
 /* Try to remove superfluous control structures.  */
 
 static bool
index 007550b..c26e91b 100644 (file)
@@ -482,7 +482,6 @@ extern void cfg_remove_useless_stmts (void);
 extern edge thread_edge (edge, basic_block);
 extern basic_block label_to_block (tree);
 extern void tree_optimize_tail_calls (bool, enum tree_dump_index);
-extern edge tree_block_forwards_to (basic_block bb);
 extern void bsi_insert_on_edge (edge, tree);
 extern basic_block bsi_insert_on_edge_immediate (edge, tree);
 extern void bsi_commit_edge_inserts (int *);