+/* Add values of the actual arguments to the formal arguments */
+static int add_graph_args (ir_graph *graph, ir_node *call, pto_env_t *env)
+{
+ int change = FALSE;
+ ir_type *meth = get_entity_type (get_irg_entity (graph));
+ ir_node **args = get_irg_proj_args (graph);
+ int i, n_args;
+
+ assert(op_Call == get_irn_op(call));
+
+ n_args = get_Call_n_params (call);
+
+ DBGPRINT (1, (stdout, "%s: args of %s[%li] -> 0x%08x\n",
+ __FUNCTION__,
+ OPNAME (call), OPNUM (call), (int) graph));
+
+ for (i = 0; i < n_args; i ++) {
+ if (NULL != args [i]) {
+ if (mode_P == get_type_mode (get_method_param_type (meth, i))) {
+ ir_node *call_arg = get_Call_param (call, i);
+ pto_t *arg_pto = get_pto (call_arg, env);
+ pto_t *frm_pto = get_node_pto (args [i]);
+
+ assert (arg_pto);
+ assert (frm_pto);
+
+ change |= qset_insert_all (frm_pto->values, arg_pto->values);
+
+ DBGPRINT (2, (stdout, "%s: arg [%i]: -> %s[%li] (%i) -> %s[%li] (%i)\n",
+ __FUNCTION__,
+ i,
+ OPNAME (call_arg), OPNUM (call_arg),
+ arg_pto->values->id,
+ OPNAME (args [i]), OPNUM (args [i]),
+ frm_pto->values->id));
+ }
+ }
+ }
+
+ return (change);
+}
+