* tree.h (PHI_CHAIN): New.
* (tree-cfg.c, tree-dfa.c, tree-flow-inline.h, tree-into-ssa.c,
tree-outof-ssa.c, tree-phinodes.c, tree-pretty-print.c,
tree-ssa-alias.c, tree-ssa-ccp.c, tree-ssa-dom.c, tree-ssa-dse.c,
tree-ssa-live.c, tree-ssa-loop.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
tree-ssa.c, tree-tailcall.c): Use PHI_CHAIN instead of TREE_CHAIN
when traversing a list of PHI_NODEs.
From-SVN: r83273
+2004-06-16 Steven Bosscher <stevenb@suse.de>
+
+ * tree.h (PHI_CHAIN): New.
+ * (tree-cfg.c, tree-dfa.c, tree-flow-inline.h, tree-into-ssa.c,
+ tree-outof-ssa.c, tree-phinodes.c, tree-pretty-print.c,
+ tree-ssa-alias.c, tree-ssa-ccp.c, tree-ssa-dom.c, tree-ssa-dse.c,
+ tree-ssa-live.c, tree-ssa-loop.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
+ tree-ssa.c, tree-tailcall.c): Use PHI_CHAIN instead of TREE_CHAIN
+ when traversing a list of PHI_NODEs.
+
2004-06-16 Bernardo Innocenti <bernie@develer.com>
PR target/13292
2004-06-16 Dale Johannesen <dalej@apple.com>
- * loop.c (loop_givs_reduce): Avoid miscompilation of
- loops entered at bottom.
+ * loop.c (loop_givs_reduce): Avoid miscompilation of
+ loops entered at bottom.
2004-06-16 J"orn Rennecke <joern.rennecke@superh.com>
automake 1.8.5.
2004-06-15 Eric Botcazou <ebotcazou@act-europe.fr>
- Olivier Hainque <hainque@act-europe.fr>
+ Olivier Hainque <hainque@act-europe.fr>
* function.c (fixup_var_refs): Also adjust the start of sequence
after fixing up the insns.
phi = phi_nodes (bb);
while (phi)
{
- tree next = TREE_CHAIN (phi);
+ tree next = PHI_CHAIN (phi);
remove_phi_node (phi, NULL_TREE, bb);
phi = next;
}
tree phi, val1, val2;
int n1, n2;
- for (phi = phi_nodes (dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (dest); phi; phi = PHI_CHAIN (phi))
{
n1 = phi_arg_from_edge (phi, e1);
n2 = phi_arg_from_edge (phi, e2);
/* Find all the PHI arguments on the original edge, and change them to
the new edge. Do it before redirection, so that the argument does not
get removed. */
- for (phi = phi_nodes (dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (dest); phi; phi = PHI_CHAIN (phi))
{
num_elem = PHI_NUM_ARGS (phi);
for (i = 0; i < num_elem; i++)
tree phi;
int i;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
int phi_num_args = PHI_NUM_ARGS (phi);
{
edge e;
basic_block dummy, bb;
- tree phi, new_phi, var;
+ tree phi, new_phi, var, prev, next;
dummy = fallthru->src;
bb = fallthru->dest;
/* If we redirected a branch we must create new phi nodes at the
start of BB. */
- for (phi = phi_nodes (dummy); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (dummy); phi; phi = PHI_CHAIN (phi))
{
var = PHI_RESULT (phi);
new_phi = create_phi_node (var, bb);
add_phi_arg (&new_phi, PHI_RESULT (phi), fallthru);
}
- /* Ensure that the PHI node chains are in the same order. */
- set_phi_nodes (bb, nreverse (phi_nodes (bb)));
+ /* Ensure that the PHI node chain is in the same order. */
+ prev = NULL;
+ for (phi = phi_nodes (bb); phi; phi = next)
+ {
+ next = PHI_CHAIN (phi);
+ PHI_CHAIN (phi) = prev;
+ prev = phi;
+ }
+ set_phi_nodes (bb, prev);
/* Add the arguments we have stored on edges. */
for (e = bb->pred; e; e = e->pred_next)
for (phi = phi_nodes (bb), var = PENDING_STMT (e);
phi;
- phi = TREE_CHAIN (phi), var = TREE_CHAIN (var))
+ phi = PHI_CHAIN (phi), var = TREE_CHAIN (var))
add_phi_arg (&phi, TREE_VALUE (var), e);
PENDING_STMT (e) = NULL;
/* Update PHI nodes. We know that the new argument should
have the same value as the argument associated with LAST.
Otherwise we would have changed our target block above. */
- for (phi = phi_nodes (dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (dest); phi; phi = PHI_CHAIN (phi))
{
arg = phi_arg_from_edge (phi, last);
if (arg < 0)
{
tree phi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
compute_immediate_uses_for_phi (phi, calc_for);
for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si))
{
tree phi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
free_df_for_stmt (phi);
for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si))
{
tree phi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
dump_immediate_uses_for (file, phi);
for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si))
FOR_EACH_BB (bb)
{
tree phi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
dfa_stats_p->num_phis++;
dfa_stats_p->num_phi_args += PHI_NUM_ARGS (phi);
tree phi;
bb_ann (bb)->phi_nodes = l;
- for (phi = l; phi; phi = TREE_CHAIN (phi))
+ for (phi = l; phi; phi = PHI_CHAIN (phi))
set_bb_for_stmt (phi, bb);
}
/* Step 1. Register new definitions for every PHI node in the block.
Conceptually, all the PHI nodes are executed in parallel and each PHI
node introduces a new version for the associated variable. */
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
tree result = PHI_RESULT (phi);
{
tree phi;
- for (phi = phi_nodes (e->dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
{
tree currdef;
clear_elim_graph (g);
- for (phi = phi_nodes (B); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (B); phi; phi = PHI_CHAIN (phi))
{
T0 = var_to_partition_to_var (g->map, PHI_RESULT (phi));
FOR_EACH_BB (bb)
for (e = bb->succ; e; e = e->succ_next)
if (e->dest != EXIT_BLOCK_PTR && e->flags & EDGE_ABNORMAL)
- for (phi = phi_nodes (e->dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
{
/* Visit each PHI on the destination side of this abnormal
edge, and attempt to coalesce the argument with the result. */
/* Add all potential copies via PHI arguments to the list. */
FOR_EACH_BB (bb)
{
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
tree res = PHI_RESULT (phi);
int p = var_to_partition (map, res);
{
for (phi = phi_nodes (bb); phi; phi = next)
{
- next = TREE_CHAIN (phi);
+ next = PHI_CHAIN (phi);
if (!is_gimple_reg (SSA_NAME_VAR (PHI_RESULT (phi))))
{
#ifdef ENABLE_CHECKING
{
tree phi, arg;
int p;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
p = var_to_partition (map, PHI_RESULT (phi));
{
tree phi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
tree T0 = var_to_partition_to_var (map, PHI_RESULT (phi));
{
for (phi = phi_nodes (bb); phi; phi = next)
{
- next = TREE_CHAIN (phi);
+ next = PHI_CHAIN (phi);
if ((flags & SSANORM_REMOVE_ALL_PHIS)
|| var_to_partition (map, PHI_RESULT (phi)) != NO_PARTITION)
remove_phi_node (phi, NULL_TREE, bb);
to manually take variables out of SSA form here. */
FOR_EACH_BB (bb)
{
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
tree result = SSA_NAME_VAR (PHI_RESULT (phi));
{
free_phinode_count--;
phi = free_phinodes[bucket];
- free_phinodes[bucket] = TREE_CHAIN (free_phinodes[bucket]);
+ free_phinodes[bucket] = PHI_CHAIN (free_phinodes[bucket]);
#ifdef GATHER_STATISTICS
phi_nodes_reused++;
#endif
bucket = len > NUM_BUCKETS - 1 ? NUM_BUCKETS - 1 : len;
bucket -= 2;
- TREE_CHAIN (phi) = free_phinodes[bucket];
+ PHI_CHAIN (phi) = free_phinodes[bucket];
free_phinodes[bucket] = phi;
free_phinode_count++;
}
{
free_phinode_count--;
new_phi = free_phinodes[bucket];
- free_phinodes[bucket] = TREE_CHAIN (free_phinodes[bucket]);
+ free_phinodes[bucket] = PHI_CHAIN (free_phinodes[bucket]);
#ifdef GATHER_STATISTICS
phi_nodes_reused++;
#endif
PHI_REWRITTEN (phi) = 0;
/* Add the new PHI node to the list of PHI nodes for block BB. */
- TREE_CHAIN (phi) = phi_nodes (bb);
+ PHI_CHAIN (phi) = phi_nodes (bb);
bb_ann (bb)->phi_nodes = phi;
/* Associate BB to the PHI node. */
tree p;
for (p = phi_nodes (e->dest);
- p && TREE_CHAIN (p) != old_phi;
- p = TREE_CHAIN (p))
+ p && PHI_CHAIN (p) != old_phi;
+ p = PHI_CHAIN (p))
;
if (!p)
abort ();
- TREE_CHAIN (p) = *phi;
+ PHI_CHAIN (p) = *phi;
}
}
}
if (prev)
{
/* Rewire the list if we are given a PREV pointer. */
- TREE_CHAIN (prev) = TREE_CHAIN (phi);
+ PHI_CHAIN (prev) = PHI_CHAIN (phi);
/* If we are deleting the PHI node, then we should release the
SSA_NAME node so that it can be reused. */
else if (phi == phi_nodes (bb))
{
/* Update the list head if removing the first element. */
- bb_ann (bb)->phi_nodes = TREE_CHAIN (phi);
+ bb_ann (bb)->phi_nodes = PHI_CHAIN (phi);
/* If we are deleting the PHI node, then we should release the
SSA_NAME node so that it can be reused. */
/* Traverse the list looking for the node to remove. */
tree prev, t;
prev = NULL_TREE;
- for (t = phi_nodes (bb); t && t != phi; t = TREE_CHAIN (t))
+ for (t = phi_nodes (bb); t && t != phi; t = PHI_CHAIN (t))
prev = t;
if (t)
remove_phi_node (t, prev, bb);
{
tree var = SSA_NAME_VAR (PHI_RESULT (phi));
- next = TREE_CHAIN (phi);
+ next = PHI_CHAIN (phi);
/* Only add PHI nodes for variables not in VARS. */
if (!bitmap_bit_p (vars, var_ann (var)->uid))
{
new_phi_list = last_phi = phi;
else
{
- TREE_CHAIN (last_phi) = phi;
+ PHI_CHAIN (last_phi) = phi;
last_phi = phi;
}
}
/* Make sure the last node in the new list has no successors. */
if (last_phi)
- TREE_CHAIN (last_phi) = NULL_TREE;
+ PHI_CHAIN (last_phi) = NULL_TREE;
bb_ann (bb)->phi_nodes = new_phi_list;
#if defined ENABLE_CHECKING
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
tree var = SSA_NAME_VAR (PHI_RESULT (phi));
if (bitmap_bit_p (vars, var_ann (var)->uid))
if (!phi)
return;
- for (; phi; phi = TREE_CHAIN (phi))
+ for (; phi; phi = PHI_CHAIN (phi))
{
if (is_gimple_reg (PHI_RESULT (phi)) || (flags & TDF_VOPS))
{
{
tree phi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
tree ptr = PHI_RESULT (phi);
if (POINTER_TYPE_P (TREE_TYPE (ptr)))
/* Always simulate PHI nodes, even if we have simulated this block
before. */
- for (phi = phi_nodes (block); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (block); phi; phi = PHI_CHAIN (phi))
visit_phi_node (phi);
/* If this is the first time we've simulated this block, then we
tree phi;
/* Propagate our known constants into PHI nodes. */
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
int i;
{
tree phi, var;
int x;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
value *val;
val = get_value (PHI_RESULT (phi));
the entries. */
phi_num_args = PHI_NUM_ARGS (phi);
hint = phi_num_args;
- for ( ; phi; phi = TREE_CHAIN (phi))
+ for ( ; phi; phi = PHI_CHAIN (phi))
{
int i;
tree new;
FOR_EACH_BB (bb)
{
/* Treat PHI nodes as copies between the result and each argument. */
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
int i;
tree res = PHI_RESULT (phi);
tree phi;
/* Check any PHI nodes in the block. */
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
NECESSARY (phi) = 0;
if (! NECESSARY (phi))
{
- tree next = TREE_CHAIN (phi);
+ tree next = PHI_CHAIN (phi);
if (dump_file && (dump_flags & TDF_DETAILS))
{
else
{
prev = phi;
- phi = TREE_CHAIN (phi);
+ phi = PHI_CHAIN (phi);
}
}
}
/* All variables referenced in PHI nodes we bypass must be
renamed. */
- for (phi = phi_nodes (e->dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
{
tree result = SSA_NAME_VAR (PHI_RESULT (phi));
/* Finally, any variables in PHI nodes at our final destination
must also be taken our of SSA form. */
- for (phi = phi_nodes (tgt); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (tgt); phi; phi = PHI_CHAIN (phi))
{
tree result = SSA_NAME_VAR (PHI_RESULT (phi));
{
tree result = PHI_RESULT (phi);
- next = TREE_CHAIN (phi);
+ next = PHI_CHAIN (phi);
if (bitmap_bit_p (virtuals_to_rename,
var_ann (SSA_NAME_VAR (result))->uid))
tree phi;
/* Each PHI creates a temporary equivalence, record them. */
- for (phi = phi_nodes (e->dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
{
tree src = PHI_ARG_DEF (phi, phi_arg_from_edge (phi, e));
tree dst = PHI_RESULT (phi);
= VARRAY_TOP_GENERIC_PTR (walk_data->block_data_stack);
tree phi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
tree lhs = PHI_RESULT (phi);
tree rhs = NULL;
struct dse_global_data *dse_gd = walk_data->global_data;
tree phi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
if (need_imm_uses_for (PHI_RESULT (phi)))
record_voperand_set (dse_gd->stores,
&bd->stores,
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
stmt_ann (bsi_stmt (bsi))->uid = uid++;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
stmt_ann (phi)->uid = uid++;
}
FOR_EACH_BB (bb)
{
tree phi, arg;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
int i;
register_ssa_partition (map, PHI_RESULT (phi), false);
{
bitmap_clear (saw_def);
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
for (i = 0; i < PHI_NUM_ARGS (phi); i++)
{
The a_3 referred to in b_3's PHI node is the one incoming on the
edge, *not* the PHI node just seen. */
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
var = PHI_RESULT (phi);
set_if_valid (map, saw_def, var);
int z, ok = 0;
for (phi = phi_nodes (e->dest);
phi && !ok;
- phi = TREE_CHAIN (phi))
+ phi = PHI_CHAIN (phi))
{
for (z = 0; z < PHI_NUM_ARGS (phi); z++)
if (var == PHI_ARG_DEF (phi, z))
/* Set all the live-on-exit bits for uses in PHIs. */
FOR_EACH_BB (bb)
{
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
for (i = 0; i < PHI_NUM_ARGS (phi); i++)
{
t = PHI_ARG_DEF (phi, i);
going to be translated out of SSA form we must record a conflict
between the result of the PHI and any variables with are live.
Otherwise the out-of-ssa translation may create incorrect code. */
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
tree result = PHI_RESULT (phi);
int p = var_to_partition (map, result);
{
tree result = SSA_NAME_VAR (PHI_RESULT (phi));
- next = TREE_CHAIN (phi);
+ next = PHI_CHAIN (phi);
if (bitmap_bit_p (vars, var_ann (result)->uid))
{
if (! is_gimple_reg (result))
v_must_def_optype v_must_defs;
unsigned i;
- for (stmt = phi_nodes (bb); stmt; stmt = TREE_CHAIN (stmt))
+ for (stmt = phi_nodes (bb); stmt; stmt = PHI_CHAIN (stmt))
{
var = SSA_NAME_VAR (PHI_RESULT (stmt));
bitmap_set_bit (vars_to_rename, var_ann (var)->uid);
for (e1 = new_header->succ; e1->dest != e->dest; e1 = e1->succ_next)
continue;
- for (phi = phi_nodes (e->dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
{
tree def = phi_element_for_edge (phi, e)->def;
add_phi_arg (&phi, def, e1);
/* We're searching for blocks with one PHI node which has two
arguments. */
phi = phi_nodes (bb);
- if (phi && TREE_CHAIN (phi) == NULL
+ if (phi && PHI_CHAIN (phi) == NULL
&& PHI_NUM_ARGS (phi) == 2)
{
arg0 = PHI_ARG_DEF (phi, 0);
dom = get_immediate_dominator (CDI_DOMINATORS, block);
if (dom)
set_copy (AVAIL_OUT (block), AVAIL_OUT (dom));
- for (phi = phi_nodes (block); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (block); phi; phi = PHI_CHAIN (phi))
{
/* Ignore virtual PHIs until we can do PRE on expressions
with virtual operands. */
/* Remove the appropriate PHI arguments in E's destination block. */
for (phi = phi_nodes (e->dest); phi; phi = next)
{
- next = TREE_CHAIN (phi);
+ next = PHI_CHAIN (phi);
remove_phi_arg (phi, e->src);
}
/* Remove the appropriate PHI arguments in E's destination block. */
for (phi = phi_nodes (e->dest); phi; phi = next)
{
- next = TREE_CHAIN (phi);
+ next = PHI_CHAIN (phi);
i = phi_arg_from_edge (phi, e);
if (i < 0)
tree phi;
block_stmt_iterator bsi;
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
err |= verify_def (bb, definition_block, PHI_RESULT (phi), phi);
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
}
/* Verify the arguments for every PHI node in the block. */
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
err |= verify_phi_args (phi, bb, definition_block);
/* Now verify all the uses and vuses in every statement of the block.
FOR_EACH_BB (bb)
{
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
var = PHI_RESULT (phi);
execute_early_warn_uninitialized ();
FOR_EACH_BB (bb)
- for (phi = phi_nodes (bb); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
warn_uninitialized_phi (phi);
}
basic_block dest = e->dest;
tree phi;
- for (phi = phi_nodes (dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (dest); phi; phi = PHI_CHAIN (phi))
if (phi_element_for_edge (phi, e)->def == var)
return PHI_RESULT (phi);
if (a_acc)
{
- for (phi = phi_nodes (back->dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (back->dest); phi; phi = PHI_CHAIN (phi))
if (PHI_RESULT (phi) == a_acc)
break;
if (m_acc)
{
- for (phi = phi_nodes (back->dest); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (back->dest); phi; phi = PHI_CHAIN (phi))
if (PHI_RESULT (phi) == m_acc)
break;
args = TREE_CHAIN (args))
{
- for (phi = phi_nodes (first); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (first); phi; phi = PHI_CHAIN (phi))
if (param == SSA_NAME_VAR (PHI_RESULT (phi)))
break;
for (i = 0; i < NUM_V_MAY_DEFS (v_may_defs); i++)
{
param = SSA_NAME_VAR (V_MAY_DEF_RESULT (v_may_defs, i));
- for (phi = phi_nodes (first); phi; phi = TREE_CHAIN (phi))
+ for (phi = phi_nodes (first); phi; phi = PHI_CHAIN (phi))
if (param == SSA_NAME_VAR (PHI_RESULT (phi)))
break;
/* In a PHI_NODE node. */
#define PHI_RESULT(NODE) PHI_NODE_CHECK (NODE)->phi.result
+/* PHI_NODEs for each basic block are chained together in a single linked
+ list. The head of the list is linked from the block annotation, and
+ the link to the next PHI is in PHI_CHAIN. */
+#define PHI_CHAIN(NODE) TREE_CHAIN (PHI_NODE_CHECK (NODE))
+
/* Nonzero if the PHI node was rewritten by a previous pass through the
SSA renamer. */
#define PHI_REWRITTEN(NODE) PHI_NODE_CHECK (NODE)->phi.rewritten