This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] ipa-inline.c cleanups
- From: Steven Bosscher <stevenb at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Josh Conner <jconner at apple dot com>, Jan Hubicka <jh at suse dot cz>
- Date: Sat, 23 Jul 2005 00:23:52 +0200
- Subject: Re: [PATCH] ipa-inline.c cleanups
- References: <97762CDC-D163-471E-9333-22C80823293D@apple.com>
On Saturday 23 July 2005 00:01, Josh Conner wrote:
> Attached are three patches that clean up small issues in ipa-inline.c.
> 1) adjustment for nesting in cgraph_edge_badness is backward if
> badness is < 0.
Instead of your patch, how about something like:
- badness >>= nest;
+ badness = badness / (1 << nest);
(modulo errors, it's late here ;-)
> 2) fix for failed inlining diagnostics
! && (!node->local.inlinable || !cgraph_default_inline_p (node, 0))))
Should be s/0/NULL/ I suppose. Otherwise, this looks OK to me
(but I can't approve it of course).
> 3) comment fixes in cgraph_edge_badness
> These comments refer to wanting to use "loop depth" and "frequency
> information", but I think both of those are already used in the
This looks like an oversight when the profile stuff was added.
> Also, the comments claim that returning MAX_INT prevents a function
> from being inlined, but I can't see any evidence of that being true.
This patch also looks OK to me.
P.S. Note unrelated to your patch, I noticed this nicety:
"int badness = cgraph_estimate_growth (edge->callee) * 256;". This
is going to be fun with very large functions (e.g. 2GB and up, like
those supported in the large code model of the AMD64 ABI). Honza,
is this overflow-safe??