summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-25 22:31:09 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-25 22:31:09 +0000
commit04cd62684a41bd3be3ab11d6f7827c054b4feed9 (patch)
tree66c8df427757e768c2a5be03b5940cc14259184e
parentb6849408a352a14a35dd90750dfd4414fa04cd1d (diff)
downloadppe42-gcc-04cd62684a41bd3be3ab11d6f7827c054b4feed9.tar.gz
ppe42-gcc-04cd62684a41bd3be3ab11d6f7827c054b4feed9.zip
* tree-phinodes.c (add_phi_arg): Take "tree" instead of
"tree *" as the first argument. * tree-flow.h: Update the prototype of add_phi_arg. * lambda-code.c, tree-cfg.c, tree-into-ssa.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-pre.c, tree-ssa-threadupdate.c, tree-ssa.c, tree-tailcall.c, tree-vectorizer.c: Update all call sites of add_phi_arg. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91307 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/lambda-code.c2
-rw-r--r--gcc/tree-cfg.c12
-rw-r--r--gcc/tree-flow.h2
-rw-r--r--gcc/tree-into-ssa.c4
-rw-r--r--gcc/tree-phinodes.c14
-rw-r--r--gcc/tree-ssa-loop-ivopts.c2
-rw-r--r--gcc/tree-ssa-loop-manip.c10
-rw-r--r--gcc/tree-ssa-pre.c2
-rw-r--r--gcc/tree-ssa-threadupdate.c2
-rw-r--r--gcc/tree-ssa.c2
-rw-r--r--gcc/tree-tailcall.c16
-rw-r--r--gcc/tree-vectorizer.c16
13 files changed, 52 insertions, 42 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 96aebd52316..316ca15473e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2004-11-25 Kazu Hirata <kazu@cs.umass.edu>
+
+ * tree-phinodes.c (add_phi_arg): Take "tree" instead of
+ "tree *" as the first argument.
+ * tree-flow.h: Update the prototype of add_phi_arg.
+ * lambda-code.c, tree-cfg.c, tree-into-ssa.c,
+ tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-pre.c,
+ tree-ssa-threadupdate.c, tree-ssa.c, tree-tailcall.c,
+ tree-vectorizer.c: Update all call sites of add_phi_arg.
+
2004-11-25 Nathan Sidwell <nathan@codesourcery.com>
* bitmap.c (bitmap_malloc_alloc, bitmap_malloc_free): Remove.
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index 96d9798aabd..1fc3af52d9b 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -2330,7 +2330,7 @@ perfect_nestify (struct loops *loops,
def = VEC_pop (tree, phis);
phiname = VEC_pop (tree, phis);
phi = create_phi_node (phiname, preheaderbb);
- add_phi_arg (&phi, def, EDGE_PRED (preheaderbb, 0));
+ add_phi_arg (phi, def, EDGE_PRED (preheaderbb, 0));
}
flush_pending_stmts (e);
unmark_all_for_rewrite ();
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index bd2555fbaae..2d02f71d5b0 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3130,7 +3130,7 @@ reinstall_phi_args (edge new_edge, edge old_edge)
gcc_assert (result == PHI_RESULT (phi));
- add_phi_arg (&phi, arg, new_edge);
+ add_phi_arg (phi, arg, new_edge);
}
PENDING_STMT (old_edge) = NULL;
@@ -3862,7 +3862,7 @@ tree_make_forwarder_block (edge fallthru)
new_phi = create_phi_node (var, bb);
SSA_NAME_DEF_STMT (var) = new_phi;
SET_PHI_RESULT (phi, make_ssa_name (SSA_NAME_VAR (var), phi));
- add_phi_arg (&new_phi, PHI_RESULT (phi), fallthru);
+ add_phi_arg (new_phi, PHI_RESULT (phi), fallthru);
}
/* Ensure that the PHI node chain is in the same order. */
@@ -4040,7 +4040,7 @@ thread_jumps_from_bb (basic_block bb)
{
arg = phi_arg_from_edge (phi, last);
gcc_assert (arg >= 0);
- add_phi_arg (&phi, PHI_ARG_DEF (phi, arg), e);
+ add_phi_arg (phi, PHI_ARG_DEF (phi, arg), e);
}
}
@@ -4566,7 +4566,7 @@ add_phi_args_after_copy_bb (basic_block bb_copy)
gcc_assert (PHI_RESULT (phi) == PHI_RESULT (phi_copy));
def = PHI_ARG_DEF_FROM_EDGE (phi, e);
- add_phi_arg (&phi_copy, def, e_copy);
+ add_phi_arg (phi_copy, def, e_copy);
}
}
}
@@ -4888,8 +4888,8 @@ tree_duplicate_sese_region (edge entry, edge exit,
tree name = ssa_name (ver);
phi = create_phi_node (name, exit->dest);
- add_phi_arg (&phi, name, exit);
- add_phi_arg (&phi, name, exit_copy);
+ add_phi_arg (phi, name, exit);
+ add_phi_arg (phi, name, exit_copy);
SSA_NAME_DEF_STMT (name) = phi;
}
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 9847eaf6ac3..39b81fc2ded 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -518,7 +518,7 @@ extern stmt_ann_t create_stmt_ann (tree);
extern tree_ann_t create_tree_ann (tree);
extern void reserve_phi_args_for_new_edge (basic_block);
extern tree create_phi_node (tree, basic_block);
-extern void add_phi_arg (tree *, tree, edge);
+extern void add_phi_arg (tree, tree, edge);
extern void remove_phi_args (edge);
extern void remove_phi_node (tree, tree, basic_block);
extern void remove_all_phi_nodes_for (bitmap);
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 19711851832..f79799ee372 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -797,7 +797,7 @@ rewrite_add_phi_arguments (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
break;
currdef = get_reaching_def (SSA_NAME_VAR (PHI_RESULT (phi)));
- add_phi_arg (&phi, currdef, e);
+ add_phi_arg (phi, currdef, e);
}
}
}
@@ -1071,7 +1071,7 @@ insert_phi_nodes_for (tree var, bitmap *dfs, VEC(basic_block) *work_stack)
{
edge_iterator ei;
FOR_EACH_EDGE (e, ei, bb->preds)
- add_phi_arg (&phi, var, e);
+ add_phi_arg (phi, var, e);
}
}
diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c
index f566c808957..dc37066969b 100644
--- a/gcc/tree-phinodes.c
+++ b/gcc/tree-phinodes.c
@@ -334,30 +334,30 @@ create_phi_node (tree var, basic_block bb)
PHI points to the reallocated phi node when we return. */
void
-add_phi_arg (tree *phi, tree def, edge e)
+add_phi_arg (tree phi, tree def, edge e)
{
basic_block bb = e->dest;
- gcc_assert (bb == bb_for_stmt (*phi));
+ gcc_assert (bb == bb_for_stmt (phi));
/* We resize PHI nodes upon edge creation. We should always have
enough room at this point. */
- gcc_assert (PHI_NUM_ARGS (*phi) <= PHI_ARG_CAPACITY (*phi));
+ gcc_assert (PHI_NUM_ARGS (phi) <= PHI_ARG_CAPACITY (phi));
/* We resize PHI nodes upon edge creation. We should always have
enough room at this point. */
- gcc_assert (e->dest_idx < (unsigned int) PHI_NUM_ARGS (*phi));
+ gcc_assert (e->dest_idx < (unsigned int) PHI_NUM_ARGS (phi));
/* Copy propagation needs to know what object occur in abnormal
PHI nodes. This is a convenient place to record such information. */
if (e->flags & EDGE_ABNORMAL)
{
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def) = 1;
- SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (*phi)) = 1;
+ SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (phi)) = 1;
}
- SET_PHI_ARG_DEF (*phi, e->dest_idx, def);
- PHI_ARG_NONZERO (*phi, e->dest_idx) = false;
+ SET_PHI_ARG_DEF (phi, e->dest_idx, def);
+ PHI_ARG_NONZERO (phi, e->dest_idx) = false;
}
/* Remove the Ith argument from PHI's argument list. This routine assumes
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 58c751e71bc..9bc66599dfe 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -4591,7 +4591,7 @@ protect_loop_closed_ssa_form_use (edge exit, use_operand_p op_p)
phi = create_phi_node (new_name, exit->dest);
SSA_NAME_DEF_STMT (new_name) = phi;
- add_phi_arg (&phi, use, exit);
+ add_phi_arg (phi, use, exit);
}
SET_USE (op_p, PHI_RESULT (phi));
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 3a8784985f7..01c75c87cfa 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -110,8 +110,8 @@ create_iv (tree base, tree step, tree var, struct loop *loop,
stmt = create_phi_node (vb, loop->header);
SSA_NAME_DEF_STMT (vb) = stmt;
- add_phi_arg (&stmt, initial, loop_preheader_edge (loop));
- add_phi_arg (&stmt, va, loop_latch_edge (loop));
+ add_phi_arg (stmt, initial, loop_preheader_edge (loop));
+ add_phi_arg (stmt, va, loop_latch_edge (loop));
}
/* Add exit phis for the USE on EXIT. */
@@ -140,7 +140,7 @@ add_exit_phis_edge (basic_block exit, tree use)
phi = create_phi_node (use, exit);
FOR_EACH_EDGE (e, ei, exit->preds)
- add_phi_arg (&phi, use, e);
+ add_phi_arg (phi, use, e);
SSA_NAME_DEF_STMT (use) = def_stmt;
}
@@ -420,7 +420,7 @@ split_loop_exit_edge (edge exit)
new_name = duplicate_ssa_name (name, NULL);
new_phi = create_phi_node (new_name, bb);
SSA_NAME_DEF_STMT (new_name) = new_phi;
- add_phi_arg (&new_phi, name, exit);
+ add_phi_arg (new_phi, name, exit);
SET_USE (op_p, new_name);
}
}
@@ -672,7 +672,7 @@ lv_adjust_loop_header_phi (basic_block first, basic_block second,
if (e2)
{
tree def = PHI_ARG_DEF (phi2, e2->dest_idx);
- add_phi_arg (&phi1, def, e);
+ add_phi_arg (phi1, def, e);
}
}
}
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index cbf43c42a70..7cffc565699 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -1555,7 +1555,7 @@ insert_aux (basic_block block)
PHI_RESULT (temp));
FOR_EACH_EDGE (pred, ei, block->preds)
{
- add_phi_arg (&temp, avail[pred->src->index],
+ add_phi_arg (temp, avail[pred->src->index],
pred);
}
if (dump_file && (dump_flags & TDF_DETAILS))
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index f10dc3ddff1..d5272d53374 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -299,7 +299,7 @@ create_edge_and_update_destination_phis (struct redirection_data *rd)
for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
{
int indx = phi_arg_from_edge (phi, rd->outgoing_edge);
- add_phi_arg (&phi, PHI_ARG_DEF_TREE (phi, indx), e);
+ add_phi_arg (phi, PHI_ARG_DEF_TREE (phi, indx), e);
}
}
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index e2b23f01844..8e2e0982cde 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -96,7 +96,7 @@ flush_pending_stmts (edge e)
phi = PHI_CHAIN (phi), arg = TREE_CHAIN (arg))
{
tree def = TREE_VALUE (arg);
- add_phi_arg (&phi, def, e);
+ add_phi_arg (phi, def, e);
}
PENDING_STMT (e) = NULL;
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 00fdea301ad..5c5e09cce05 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -589,7 +589,7 @@ adjust_accumulator_values (block_stmt_iterator bsi, tree m, tree a, edge back)
if (PHI_RESULT (phi) == a_acc)
break;
- add_phi_arg (&phi, a_acc_arg, back);
+ add_phi_arg (phi, a_acc_arg, back);
}
if (m_acc)
@@ -598,7 +598,7 @@ adjust_accumulator_values (block_stmt_iterator bsi, tree m, tree a, edge back)
if (PHI_RESULT (phi) == m_acc)
break;
- add_phi_arg (&phi, m_acc_arg, back);
+ add_phi_arg (phi, m_acc_arg, back);
}
}
@@ -736,7 +736,7 @@ eliminate_tail_call (struct tailcall *t)
if (!phi)
continue;
- add_phi_arg (&phi, TREE_VALUE (args), e);
+ add_phi_arg (phi, TREE_VALUE (args), e);
}
/* Add phi nodes for the call clobbered variables. */
@@ -766,7 +766,7 @@ eliminate_tail_call (struct tailcall *t)
var_ann (param)->default_def = new_name;
phi = create_phi_node (name, first);
SSA_NAME_DEF_STMT (name) = phi;
- add_phi_arg (&phi, new_name, EDGE_SUCC (ENTRY_BLOCK_PTR, 0));
+ add_phi_arg (phi, new_name, EDGE_SUCC (ENTRY_BLOCK_PTR, 0));
/* For all calls the same set of variables should be clobbered. This
means that there always should be the appropriate phi node except
@@ -774,7 +774,7 @@ eliminate_tail_call (struct tailcall *t)
gcc_assert (EDGE_COUNT (first->preds) <= 2);
}
- add_phi_arg (&phi, V_MAY_DEF_OP (v_may_defs, i), e);
+ add_phi_arg (phi, V_MAY_DEF_OP (v_may_defs, i), e);
}
/* Update the values of accumulators. */
@@ -884,7 +884,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
var_ann (param)->default_def = new_name;
phi = create_phi_node (name, first);
SSA_NAME_DEF_STMT (name) = phi;
- add_phi_arg (&phi, new_name, EDGE_PRED (first, 0));
+ add_phi_arg (phi, new_name, EDGE_PRED (first, 0));
}
phis_constructed = true;
}
@@ -897,7 +897,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
add_referenced_tmp_var (tmp);
phi = create_phi_node (tmp, first);
- add_phi_arg (&phi,
+ add_phi_arg (phi,
/* RET_TYPE can be a float when -ffast-maths is
enabled. */
fold_convert (ret_type, integer_zero_node),
@@ -913,7 +913,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
add_referenced_tmp_var (tmp);
phi = create_phi_node (tmp, first);
- add_phi_arg (&phi,
+ add_phi_arg (phi,
/* RET_TYPE can be a float when -ffast-maths is
enabled. */
fold_convert (ret_type, integer_one_node),
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 8853e88da9c..57739931beb 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -504,7 +504,7 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
{
/* step 1. */
def = PHI_ARG_DEF_FROM_EDGE (phi_orig, entry_arg_e);
- add_phi_arg (&phi_new, def, new_loop_entry_e);
+ add_phi_arg (phi_new, def, new_loop_entry_e);
/* step 2. */
def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_loop_latch);
@@ -518,7 +518,7 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
/* An ordinary ssa name defined in the loop. */
new_ssa_name = *new_name_ptr;
- add_phi_arg (&phi_new, new_ssa_name, loop_latch_edge (new_loop));
+ add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop));
/* step 3 (case 1). */
if (!after)
@@ -635,8 +635,8 @@ slpeel_update_phi_nodes_for_guard (edge guard_edge,
loop_arg = orig_def;
}
}
- add_phi_arg (&new_phi, loop_arg, loop->exit_edges[0]);
- add_phi_arg (&new_phi, guard_arg, guard_edge);
+ add_phi_arg (new_phi, loop_arg, loop->exit_edges[0]);
+ add_phi_arg (new_phi, guard_arg, guard_edge);
/* 3. Update phi in successor block. */
gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == loop_arg
@@ -763,7 +763,7 @@ slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, struct loops *loops,
else
new_loop_exit_edge = EDGE_SUCC (new_loop->header, 0);
- add_phi_arg (&phi, phi_arg, new_loop_exit_edge);
+ add_phi_arg (phi, phi_arg, new_loop_exit_edge);
}
}
@@ -796,7 +796,7 @@ slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, struct loops *loops,
{
phi_arg = PHI_ARG_DEF_FROM_EDGE (phi, entry_e);
if (phi_arg)
- add_phi_arg (&phi, phi_arg, new_exit_e);
+ add_phi_arg (phi, phi_arg, new_exit_e);
}
redirect_edge_and_branch_force (entry_e, new_loop->header);
@@ -2646,8 +2646,8 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
msq = make_ssa_name (vec_dest, NULL_TREE);
phi_stmt = create_phi_node (msq, loop->header); /* CHECKME */
SSA_NAME_DEF_STMT (msq) = phi_stmt;
- add_phi_arg (&phi_stmt, msq_init, loop_preheader_edge (loop));
- add_phi_arg (&phi_stmt, lsq, loop_latch_edge (loop));
+ add_phi_arg (phi_stmt, msq_init, loop_preheader_edge (loop));
+ add_phi_arg (phi_stmt, lsq, loop_latch_edge (loop));
/* <5> Create <vec_dest = realign_load (msq, lsq, magic)> in loop */
OpenPOWER on IntegriCloud