This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ipa-cp heuristic tweek


> 2015-03-31 15:32 GMT+03:00 Ilya Enkovich <enkovich.gnu@gmail.com>:
> > 2015-03-29 18:43 GMT+03:00 Jan Hubicka <hubicka@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.enkovich@intel.com>
> 
>         * ipa-cp (set_single_call_flag): Remove too
>         restrictive assert.

OK (this is probably artifact of earlier version of the code, thanks for pointing
it out)
Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]