struct ipa_param_call_note *note;
basic_block bb = gimple_bb (stmt);
- info->params[formal_id].called = 1;
-
note = XCNEW (struct ipa_param_call_note);
note->formal_id = formal_id;
note->stmt = stmt;
note->lto_stmt_uid = gimple_uid (stmt);
note->count = bb->count;
note->frequency = compute_call_stmt_bb_frequency (current_function_decl, bb);
+ note->loop_nest = bb->loop_depth;
note->next = info->param_calls;
info->param_calls = note;
: "(unnamed)"));
if (ipa_is_param_modified (info, i))
fprintf (f, " modified");
- if (ipa_is_param_called (info, i))
- fprintf (f, " called");
fprintf (f, "\n");
}
}
int j;
struct cgraph_edge *e;
struct bitpack_d *bp;
- int note_count;
+ int note_count = 0;
struct ipa_param_call_note *note;
encoder = ob->decl_state->cgraph_node_encoder;
bp = bitpack_create ();
bp_pack_value (bp, info->called_with_var_arguments, 1);
+ bp_pack_value (bp, info->uses_analysis_done, 1);
gcc_assert (info->modification_analysis_done
|| ipa_get_param_count (info) == 0);
- gcc_assert (info->uses_analysis_done || ipa_get_param_count (info) == 0);
gcc_assert (!info->node_enqueued);
gcc_assert (!info->ipcp_orig_node);
for (j = 0; j < ipa_get_param_count (info); j++)
- {
- bp_pack_value (bp, info->params[j].modified, 1);
- bp_pack_value (bp, info->params[j].called, 1);
- }
+ bp_pack_value (bp, info->params[j].modified, 1);
lto_output_bitpack (ob->main_stream, bp);
bitpack_delete (bp);
for (e = node->callees; e; e = e->next_callee)
bp = lto_input_bitpack (ib);
info->called_with_var_arguments = bp_unpack_value (bp, 1);
+ info->uses_analysis_done = bp_unpack_value (bp, 1);
if (ipa_get_param_count (info) != 0)
{
info->modification_analysis_done = true;
}
info->node_enqueued = false;
for (k = 0; k < ipa_get_param_count (info); k++)
- {
- info->params[k].modified = bp_unpack_value (bp, 1);
- info->params[k].called = bp_unpack_value (bp, 1);
- }
+ info->params[k].modified = bp_unpack_value (bp, 1);
bitpack_delete (bp);
for (e = node->callees; e; e = e->next_callee)
{
ipa_check_create_edge_args ();
for (node = cgraph_nodes; node; node = node->next)
- {
- if (!node->analyzed)
- continue;
+ if (node->analyzed)
ipa_initialize_node_params (node);
+
+ for (node = cgraph_nodes; node; node = node->next)
+ if (node->analyzed)
for (cs = node->callees; cs; cs = cs->next_callee)
{
if (ipa_get_cs_argument_count (IPA_EDGE_REF (cs))
!= ipa_get_param_count (IPA_NODE_REF (cs->callee)))
ipa_set_called_with_variable_arg (IPA_NODE_REF (cs->callee));
}
- }
}
/* Walk param call notes of NODE and set their call statements given the uid