aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2006-06-12 13:52:51 +0000
committerKazu Hirata <kazu@codesourcery.com>2006-06-12 13:52:51 +0000
commit112f9a76f42b7b36e4b4ba666580fe9323e16c69 (patch)
treebf6d74d8283d3afb82dff31f5c413c957bdd2361
parentadc7c865121b41662374e27f07232dac8a86e125 (diff)
* tree-flow.h: Remove the prototype for
compute_phi_arg_on_exit. * tree-ssa-loop-ivopts.c (protect_loop_closed_ssa_form_use, protect_loop_closed_ssa_form, compute_phi_arg_on_exit): Remove. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@114569 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/tree-flow.h1
-rw-r--r--gcc/tree-ssa-loop-ivopts.c106
3 files changed, 8 insertions, 107 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 45696359c28..c4b463e1651 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2006-06-12 Kazu Hirata <kazu@codesourcery.com>
+
+ * tree-flow.h: Remove the prototype for
+ compute_phi_arg_on_exit.
+ * tree-ssa-loop-ivopts.c (protect_loop_closed_ssa_form_use,
+ protect_loop_closed_ssa_form, compute_phi_arg_on_exit):
+ Remove.
+
2006-06-12 Mark Shinwell <shinwell@codesourcery.com>
* builtins.c (expand_builtin_return_addr): Only use
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index abb585aba1c..4e693684bc2 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -827,7 +827,6 @@ bool for_each_index (tree *, bool (*) (tree, tree *, void *), void *);
void create_iv (tree, tree, tree, struct loop *, block_stmt_iterator *, bool,
tree *, tree *);
void split_loop_exit_edge (edge);
-void compute_phi_arg_on_exit (edge, tree, tree);
unsigned force_expr_to_var_cost (tree);
basic_block bsi_insert_on_edge_immediate_loop (edge, tree);
void standard_iv_increment_position (struct loop *, block_stmt_iterator *,
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 2bb2f0621b7..0f98604a212 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5463,112 +5463,6 @@ rewrite_use_compare (struct ivopts_data *data,
*op_p = op;
}
-/* Ensure that operand *OP_P may be used at the end of EXIT without
- violating loop closed ssa form. */
-
-static void
-protect_loop_closed_ssa_form_use (edge exit, use_operand_p op_p)
-{
- basic_block def_bb;
- struct loop *def_loop;
- tree phi, use;
-
- use = USE_FROM_PTR (op_p);
- if (TREE_CODE (use) != SSA_NAME)
- return;
-
- def_bb = bb_for_stmt (SSA_NAME_DEF_STMT (use));
- if (!def_bb)
- return;
-
- def_loop = def_bb->loop_father;
- if (flow_bb_inside_loop_p (def_loop, exit->dest))
- return;
-
- /* Try finding a phi node that copies the value out of the loop. */
- for (phi = phi_nodes (exit->dest); phi; phi = PHI_CHAIN (phi))
- if (PHI_ARG_DEF_FROM_EDGE (phi, exit) == use)
- break;
-
- if (!phi)
- {
- /* Create such a phi node. */
- tree new_name = duplicate_ssa_name (use, NULL);
-
- phi = create_phi_node (new_name, exit->dest);
- SSA_NAME_DEF_STMT (new_name) = phi;
- add_phi_arg (phi, use, exit);
- }
-
- SET_USE (op_p, PHI_RESULT (phi));
-}
-
-/* Ensure that operands of STMT may be used at the end of EXIT without
- violating loop closed ssa form. */
-
-static void
-protect_loop_closed_ssa_form (edge exit, tree stmt)
-{
- ssa_op_iter iter;
- use_operand_p use_p;
-
- FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES)
- protect_loop_closed_ssa_form_use (exit, use_p);
-}
-
-/* STMTS compute a value of a phi argument OP on EXIT of a loop. Arrange things
- so that they are emitted on the correct place, and so that the loop closed
- ssa form is preserved. */
-
-void
-compute_phi_arg_on_exit (edge exit, tree stmts, tree op)
-{
- tree_stmt_iterator tsi;
- block_stmt_iterator bsi;
- tree phi, stmt, def, next;
-
- if (!single_pred_p (exit->dest))
- split_loop_exit_edge (exit);
-
- /* Ensure there is label in exit->dest, so that we can
- insert after it. */
- tree_block_label (exit->dest);
- bsi = bsi_after_labels (exit->dest);
-
- if (TREE_CODE (stmts) == STATEMENT_LIST)
- {
- for (tsi = tsi_start (stmts); !tsi_end_p (tsi); tsi_next (&tsi))
- {
- tree stmt = tsi_stmt (tsi);
- bsi_insert_before (&bsi, stmt, BSI_SAME_STMT);
- protect_loop_closed_ssa_form (exit, stmt);
- }
- }
- else
- {
- bsi_insert_before (&bsi, stmts, BSI_SAME_STMT);
- protect_loop_closed_ssa_form (exit, stmts);
- }
-
- if (!op)
- return;
-
- for (phi = phi_nodes (exit->dest); phi; phi = next)
- {
- next = PHI_CHAIN (phi);
-
- if (PHI_ARG_DEF_FROM_EDGE (phi, exit) == op)
- {
- def = PHI_RESULT (phi);
- remove_statement (phi, false);
- stmt = build2 (MODIFY_EXPR, TREE_TYPE (op),
- def, op);
- SSA_NAME_DEF_STMT (def) = stmt;
- bsi_insert_before (&bsi, stmt, BSI_SAME_STMT);
- }
- }
-}
-
/* Rewrites USE using candidate CAND. */
static void