for (i = 0; i < count; i++)
{
struct ipcp_lattice *lat = ipcp_get_lattice (info, i);
- tree parm_tree = ipa_get_param (info, i);
/* We can proactively remove obviously unused arguments. */
- if (is_gimple_reg (parm_tree)
- && !gimple_default_def (DECL_STRUCT_FUNCTION (orig_node->decl),
- parm_tree))
+ if (!ipa_is_param_used (info, i))
{
bitmap_set_bit (args_to_skip, i);
continue;
for (i = 0; i < count; i++)
{
struct ipcp_lattice *lat = ipcp_get_lattice (info, i);
- tree parm_tree = ipa_get_param (info, i);
/* We can proactively remove obviously unused arguments. */
- if (is_gimple_reg (parm_tree)
- && !gimple_default_def (DECL_STRUCT_FUNCTION (node->decl),
- parm_tree))
+ if (!ipa_is_param_used (info, i))
removable_args++;
if (lat->type == IPA_CONST_VALUE)
for (i = 0; i < count; i++)
{
struct ipcp_lattice *lat = ipcp_get_lattice (info, i);
- tree parm_tree = ipa_get_param (info, i);
if (ipcp_lat_is_insertable (lat)
/* Do not count obviously unused arguments. */
- && (!is_gimple_reg (parm_tree)
- || gimple_default_def (DECL_STRUCT_FUNCTION (node->decl),
- parm_tree)))
+ && ipa_is_param_used (info, i))
const_param++;
}
return const_param;
parm_tree = ipa_get_param (info, i);
/* We can proactively remove obviously unused arguments. */
- if (is_gimple_reg (parm_tree)
- && !gimple_default_def (DECL_STRUCT_FUNCTION (node->decl),
- parm_tree))
+ if (!ipa_is_param_used (info, i))
{
bitmap_set_bit (args_to_skip, i);
continue;