+ info = IPA_NODE_REF (node);
+ count = ipa_get_param_count (info);
+ for (i = 0; i < count; i++)
+ {
+ struct ipcp_lattice *lat = ipcp_get_ith_lattice (info, i);
+ tree parm_tree = ipa_get_ith_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))
+ removable_args++;
+
+ if (lat->type == IPA_CONST_VALUE)
+ removable_args++;
+ }
+
+ /* We make just very simple estimate of savings for removal of operand from
+ call site. Precise cost is dificult to get, as our size metric counts
+ constants and moves as free. Generally we are looking for cases that
+ small function is called very many times. */
+ growth = node->local.inline_summary.self_insns
+ - removable_args * redirectable_node_callers;
+ if (growth < 0)
+ return 0;
+ return growth;