@@ -4181,15 +4181,14 @@ gimple_phi_result_ptr (gimple gs)
return &phi_stmt->result;
}
-/* Set RESULT to be the SSA name created by GIMPLE_PHI GS. */
+/* Set RESULT to be the SSA name created by GIMPLE_PHI PHI. */
static inline void
-gimple_phi_set_result (gimple gs, tree result)
+gimple_phi_set_result (gimple_phi phi, tree result)
{
- gimple_phi phi_stmt = as_a <gimple_statement_phi> (gs);
- phi_stmt->result = result;
+ phi->result = result;
if (result && TREE_CODE (result) == SSA_NAME)
- SSA_NAME_DEF_STMT (result) = gs;
+ SSA_NAME_DEF_STMT (result) = phi;
}
@@ -4205,14 +4204,13 @@ gimple_phi_arg (gimple gs, unsigned index)
}
/* Set PHIARG to be the argument corresponding to incoming edge INDEX
- for GIMPLE_PHI GS. */
+ for GIMPLE_PHI PHI. */
static inline void
-gimple_phi_set_arg (gimple gs, unsigned index, struct phi_arg_d * phiarg)
+gimple_phi_set_arg (gimple_phi phi, unsigned index, struct phi_arg_d * phiarg)
{
- gimple_phi phi_stmt = as_a <gimple_statement_phi> (gs);
- gcc_gimple_checking_assert (index <= phi_stmt->nargs);
- phi_stmt->args[index] = *phiarg;
+ gcc_gimple_checking_assert (index <= phi->nargs);
+ phi->args[index] = *phiarg;
}
/* Return the PHI nodes for basic block BB, or NULL if there are no
@@ -788,7 +788,7 @@ eliminate_phi (edge e, elim_graph g)
check to see if this allows another PHI node to be removed. */
static void
-remove_gimple_phi_args (gimple phi)
+remove_gimple_phi_args (gimple_phi phi)
{
use_operand_p arg_p;
ssa_op_iter iter;
@@ -816,7 +816,7 @@ remove_gimple_phi_args (gimple phi)
/* Also remove the def if it is a PHI node. */
if (gimple_code (stmt) == GIMPLE_PHI)
{
- remove_gimple_phi_args (stmt);
+ remove_gimple_phi_args (stmt->as_a_gimple_phi ());
gsi = gsi_for_stmt (stmt);
remove_phi_node (&gsi, true);
}
@@ -4517,7 +4517,7 @@ replace_removed_params_ssa_names (gimple stmt,
else if (is_gimple_call (stmt))
gimple_call_set_lhs (stmt, name);
else
- gimple_phi_set_result (stmt, name);
+ gimple_phi_set_result (stmt->as_a_gimple_phi (), name);
replace_uses_by (lhs, name);
release_ssa_name (lhs);