aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-10-07 23:31:04 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-10-07 23:31:04 +0000
commit52ea044e54f9953a69b85f33167256344411b8e4 (patch)
tree17d073442454b9ef959cd7f2d80e12c1704eafae /gcc
parentebd9dfc96ddb0e9809be06e03d6648281d85a0ea (diff)
downloadgcc-52ea044e54f9953a69b85f33167256344411b8e4.zip
gcc-52ea044e54f9953a69b85f33167256344411b8e4.tar.gz
gcc-52ea044e54f9953a69b85f33167256344411b8e4.tar.bz2
tree-cfg.c (tree_block_forwards_to): Remove.
* tree-cfg.c (tree_block_forwards_to): Remove. * tree-flow.h: Remove the corresponding prototype. From-SVN: r88719
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-cfg.c63
-rw-r--r--gcc/tree-flow.h1
3 files changed, 5 insertions, 64 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7f83e7e..ae614e4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 6a6da52..5aaad4a 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -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
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 007550b..c26e91b 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -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 *);