This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ipa-cp heuristics fixes
- From: Martin Jambor <mjambor at suse dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com
- Date: Fri, 11 Dec 2015 13:03:47 +0100
- Subject: Re: ipa-cp heuristics fixes
- Authentication-results: sourceware.org; auth=none
- References: <20151210073037 dot GA40772 at kam dot mff dot cuni dot cz> <20151210104742 dot GA3956 at virgil dot suse dot cz> <20151210165626 dot GA65813 at kam dot mff dot cuni dot cz>
On Thu, Dec 10, 2015 at 05:56:26PM +0100, Jan Hubicka wrote:
> > Is this really necessary, is it not enough to remove the assignment to
> > ret below? If the parameter is not used, devirtualization time bonus,
> > which you then rely on estimate_local_effects, should be zero for it.
> >
> > It is a very minor point, I suppose, but if the function gets cloned
> > for a different reason, it might still be beneficial to have as much
> > context-independent information for it as possible too, because that
> > can then be used in a callee (see the second call of
> > gather_context_independent_values).
> >
> > Other than that, all the changes seem like a clear improvement.
>
> The cutoff is there mainly for the rest of the function:
> if (known_aggs)
> {
> vec<ipa_agg_jf_item, va_gc> *agg_items;
> struct ipa_agg_jump_function *ajf;
>
> agg_items = context_independent_aggregate_values (plats);
> ajf = &(*known_aggs)[i];
> ajf->items = agg_items;
> ajf->by_ref = plats->aggs_by_ref;
> ret |= agg_items != NULL;
> }
> I did not want ret to become true if we manage to propagate into an unused
> aggregate parameter.
I see, it makes sense.
Thanks,
Martin