[PATCH, PR 51362] Make IPA-CP not ICE if estimate_ipcp_clone_size_and_time returns zero size
Jan Hubicka
hubicka@ucw.cz
Tue Dec 13 16:13:00 GMT 2011
> On Tue, Dec 13, 2011 at 2:38 PM, Martin Jambor <mjambor@suse.cz> wrote:
> > Hi,
> >
> > IPA-CP currently assumes that cloning estimates always have some
> > positive size cost. Â However, there are apparently situations in which
> > estimate_ipcp_clone_size_and_time does return zero size and which then
> > mostly lead to divisions by zero or failed asserts. Â This patch avoids
> > that by simply bumping the sizes to 1 in those cases.
> >
> > Bootstrapped and tested on x86_64-linux. OK for trunk?
>
> Ok.
It sounds like some bug earlier, because offline functions are accounted to have size of 1,
see estimate_function_body_sizes:
/* Estimate static overhead for function prologue/epilogue and alignment. */
int size = 2;
(later the value is divied by two)
I will try to debug why this value is no longer accounted.
Honza
More information about the Gcc-patches
mailing list