This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ipa-cp heuristic tweek
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 3 Apr 2015 18:57:56 +0200
- Subject: Re: ipa-cp heuristic tweek
- Authentication-results: sourceware.org; auth=none
- References: <20150329154320 dot GA67588 at kam dot mff dot cuni dot cz> <CAMbmDYY-Zp8XypPJPFdNtNPis9juZ9pXnHbBneuDRhFcjLK8Xw at mail dot gmail dot com> <CAMbmDYb7VkT0u8DaXogHksPZXXWH2aPCnDmcnN1m8KVYEF=RxA at mail dot gmail dot com>
> 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