This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR middle-end/28779
On Sun, 17 Feb 2008, Jan Hubicka wrote:
> >
> > I remember this is somehow "carefuly" crafted to not cause ICEs when due to
> > miscounting here we end up with ICE in inliner when inlined size goes
> > negative ;)
>
> Yep, the testcase in PR28779 is precisely about inline size getting
> negative due to mismatch with what inliner does. This happens because
> of what is just declaration at esitmate_num_insns becomes real function
> at early inlining time. This won't happen with unit-at-a-time, since we
> analyze after parsing everything unless --combine is used. Non
> unit-at-a-time compilation is affected by same problem however.
>
> This version attempts to be crafted just bit more "carefuly" than
> former: The former fix replaced CALL_EXPR arguments walk by walk of
> DECL_ARGUMENTS when available and CALL_EXPR as fallback. Due to thinko
> it also eliminated the walk completely for functions with prototype but
> no definition. This fix keeps DECL_ARGUMENTS walk but adds TYPE_ARGS
> walk that is used when prototype is around keeping CALL_EXPR walk as
> fallback for functions with no definition nor prototype.
Ah, I see ;) Still please wait until after we have branched.
Thanks,
Richard.