This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/24093] [4.1 Regression] cgraph exhausts virtual memory building 197.parser with -profile-use -O3
- From: "krebbel1 at de dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Oct 2005 14:42:38 -0000
- Subject: [Bug middle-end/24093] [4.1 Regression] cgraph exhausts virtual memory building 197.parser with -profile-use -O3
- References: <bug-24093-224@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from krebbel1 at de dot ibm dot com 2005-10-17 14:42 -------
I think the problem is that cgraph_decide_recursive_inlining returns true even
if nothing got inlined. That may happen if the function is already more often
inlined into itself than max_depth. In this case the body of the while loop is
not even once executed. With the attached patch the function returns true only
if the counter n got increased at least once indicating that inlining took
place. This patchfixes the bug for the 197.parser testcase and bootstraps on
s390 and s390x without testsuite regressions. It survived a profiledbootstrap
on i686 without producing testsuite regressions.
Index: gcc/ipa-inline.c
===================================================================
*** gcc/ipa-inline.c.orig 2005-10-11 17:20:15.000000000 +0200
--- gcc/ipa-inline.c 2005-10-17 13:58:56.000000000 +0200
*************** cgraph_decide_recursive_inlining (struct
*** 650,656 ****
function. At this place we should probably walk the function and
inline clones and compensate the counts accordingly. This probably
doesn't matter much in practice. */
! return true;
}
/* Set inline_failed for all callers of given function to REASON. */
--- 650,656 ----
function. At this place we should probably walk the function and
inline clones and compensate the counts accordingly. This probably
doesn't matter much in practice. */
! return n > 0;
}
/* Set inline_failed for all callers of given function to REASON. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24093