This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR 51600] IPA-CP workaround for negative size cloning estimates
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Wed, 21 Dec 2011 17:29:51 +0100
- Subject: Re: [PATCH, PR 51600] IPA-CP workaround for negative size cloning estimates
- References: <20111221101949.GA12105@virgil.arch.suse.de>
> Hi,
>
> given that we already have a workaround for zero size increase
> estimates from estimate_ipcp_clone_size_and_time, I see little reason
> not to extend it to negative values too, 0 is really just as bad as -2
> that we are getting in the testcase. Hopefully this will allow peple
> who hit this bug proceed with their testing.
>
> Bootstrapped and tested on x86-64-linux with no regressions.
> OK for trunk?
Hmm, so the size value is not negative because estimate_ipcp_clone_size_and_time
would return 0 or negative value but because of
size -= stats.n_calls * removable_params_cost
(i.e. the callee function is so small that the program will really shrink because
of reduced call overhead)?
In that case I guess the patch is OK, but please update the comment,
in current form it realy is misleading - i.e. we do not estimate functions
to have size of 0.
Honza