This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] ipa-inline.c cleanups
- From: Josh Conner <jconner at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jan Hubicka <jh at suse dot cz>
- Date: Fri, 22 Jul 2005 15:01:09 -0700
- Subject: [PATCH] ipa-inline.c cleanups
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.
In the function cgraph_edge_badness, we calculate a signed value to
represent desirability to inline, where smaller is better. To
encourage inlining of calls that appear within a loop, we have the
following code:
badness >>= nest;
If badness is negative, however, this adjustment discourages inlining
of a call within a loop by increasing badness. Note that since
"nest" values are not currently calculated, this fix has no effect at
the moment (I mentioned this before, and Honza indicated he intended
to address it at some point: http://gcc.gnu.org/ml/gcc-patches/
2005-06/msg00779.html). Attached as "nestshift.patch", and tested
with i686-pc-linux-gnu with no regressions. OK for mainline?
2) fix for failed inlining diagnostics
In some instances, the diagnostic messages that are emitted into the
dump files for inlining are incorrect. For example, if a function is
not inlined because it exceeds the "max-inline-insns-auto" size, it
is reported as failing for exceeding the "max-inline-insns-single"
size instead. This can be confusing when working with the dump
files. Attached as "limit-notify.patch", and tested with i686-pc-
linux-gnu with no regressions. OK for mainline?
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
function.
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.
Attached as "badness-comments.patch", and tested by rebuilding with
patch installed. OK for mainline?
- Josh
Attachment:
nestshift.patch
Description: Binary data
Attachment:
limit-notify.patch
Description: Binary data
Attachment:
badness-comments.patch
Description: Binary data