2015-03-31 15:32 GMT+03:00 Ilya Enkovich <enkovich....@gmail.com>: > 2015-03-29 18:43 GMT+03:00 Jan Hubicka <hubi...@ucw.cz>: >> +static bool >> +set_single_call_flag (cgraph_node *node, void *) >> +{ >> + cgraph_edge *cs = node->callers; >> + /* Local thunks can be handled transparently, skip them. */ >> + while (cs && cs->caller->thunk.thunk_p && cs->caller->local.local) >> + cs = cs->next_caller; >> + if (cs) >> + { >> + gcc_assert (!cs->next_caller); > > This assert assumes the only non-thunk caller is always at the end of > a callers list. Is it actually guaranteed? > >> + IPA_NODE_REF (cs->caller)->node_calling_single_call = true; >> + return true; >> + } >> + return false; >> +} >> + >> /* Initialize ipcp_lattices. */ > > > Thanks, > Ilya
Hi Honza, For chkp testing I see cases when gcc asserts in set_single_call_flag because instrumentation thunk is not the last one in a callers list. I want to install following patch to fix it. Is it OK? Thanks, Ilya -- 2015-04-03 Ilya Enkovich <ilya.enkov...@intel.com> * ipa-cp (set_single_call_flag): Remove too restrictive assert. diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index d9aa92e..bfe4821 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -839,7 +839,6 @@ set_single_call_flag (cgraph_node *node, void *) cs = cs->next_caller; if (cs) { - gcc_assert (!cs->next_caller); IPA_NODE_REF (cs->caller)->node_calling_single_call = true; return true; }