Commit 9323afae by Kazu Hirata Committed by Kazu Hirata

tree-ssa-pre.c (phi_translate): Use find_edge to find the index of a PHI argument.

	* tree-ssa-pre.c (phi_translate): Use find_edge to find the
	index of a PHI argument.

From-SVN: r91154
parent 58e594dc
2004-11-24 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-pre.c (phi_translate): Use find_edge to find the
index of a PHI argument.
2004-11-24 Steven Bosscher <stevenb@suse.de>
* expr.c (expand_expr_real_1): Remove cases for EXIT_BLOCK_EXPR
......
......@@ -922,22 +922,21 @@ phi_translate (tree expr, value_set_t set, basic_block pred,
case tcc_exceptional:
{
tree phi = NULL;
int i;
edge e;
gcc_assert (TREE_CODE (expr) == SSA_NAME);
if (TREE_CODE (SSA_NAME_DEF_STMT (expr)) == PHI_NODE)
phi = SSA_NAME_DEF_STMT (expr);
else
return expr;
for (i = 0; i < PHI_NUM_ARGS (phi); i++)
if (PHI_ARG_EDGE (phi, i)->src == pred)
{
tree val;
if (is_undefined_value (PHI_ARG_DEF (phi, i)))
return NULL;
val = vn_lookup_or_add (PHI_ARG_DEF (phi, i), NULL);
return PHI_ARG_DEF (phi, i);
}
e = find_edge (pred, bb_for_stmt (phi));
if (e)
{
if (is_undefined_value (PHI_ARG_DEF (phi, e->dest_idx)))
return NULL;
vn_lookup_or_add (PHI_ARG_DEF (phi, e->dest_idx), NULL);
return PHI_ARG_DEF (phi, e->dest_idx);
}
}
return expr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment