ipa-cp heuristics fixes
Jan Hubicka
hubicka@ucw.cz
Thu Dec 10 16:56:00 GMT 2015
> 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.
Honza
More information about the Gcc-patches
mailing list