return &(gs->args[index]);
}
+inline const phi_arg_d *
+gimple_phi_arg (const gimple *gs, unsigned index)
+{
+ const gphi *phi_stmt = as_a <const gphi *> (gs);
+ return gimple_phi_arg (phi_stmt, index);
+}
+
inline struct phi_arg_d *
gimple_phi_arg (gimple *gs, unsigned index)
{
}
inline tree
-gimple_phi_arg_def (gimple *gs, size_t index)
+gimple_phi_arg_def (const gimple *gs, size_t index)
{
return gimple_phi_arg (gs, index)->def;
}
+/* Return the tree operand for the argument associated with
+ edge E of PHI node GS. */
+
+inline tree
+gimple_phi_arg_def_from_edge (const gphi *gs, const_edge e)
+{
+ gcc_checking_assert (e->dest == gimple_bb (gs));
+ return gimple_phi_arg (gs, e->dest_idx)->def;
+}
+
+inline tree
+gimple_phi_arg_def_from_edge (const gimple *gs, const_edge e)
+{
+ gcc_checking_assert (e->dest == gimple_bb (gs));
+ return gimple_phi_arg (gs, e->dest_idx)->def;
+}
/* Return a pointer to the tree operand for argument I of phi node PHI. */
return &gimple_phi_arg (gs, i)->imm_use;
}
+inline use_operand_p
+gimple_phi_arg_imm_use_ptr_from_edge (gimple *gs, const_edge e)
+{
+ gcc_checking_assert (e->dest == gimple_bb (gs));
+ return &gimple_phi_arg (gs, e->dest_idx)->imm_use;
+}
+
/* Return the phi argument which contains the specified use. */
inline int
#define SET_PHI_ARG_DEF(PHI, I, V) \
SET_USE (PHI_ARG_DEF_PTR ((PHI), (I)), (V))
#define PHI_ARG_DEF_FROM_EDGE(PHI, E) \
- PHI_ARG_DEF ((PHI), (E)->dest_idx)
+ gimple_phi_arg_def_from_edge ((PHI), (E))
#define PHI_ARG_DEF_PTR_FROM_EDGE(PHI, E) \
- PHI_ARG_DEF_PTR ((PHI), (E)->dest_idx)
+ gimple_phi_arg_imm_use_ptr_from_edge ((PHI), (E))
#define PHI_ARG_INDEX_FROM_USE(USE) phi_arg_index_from_use (USE)