This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Limit SH strncmp inline expansion (PR target/78460)
- From: Oleg Endo <oleg dot endo at t-online dot de>
- To: Joseph Myers <joseph at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Cc: aoliva at redhat dot com, olegendo at gcc dot gnu dot org
- Date: Wed, 16 Aug 2017 08:27:12 +0900
- Subject: Re: Limit SH strncmp inline expansion (PR target/78460)
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1708152114250.19980@digraph.polyomino.org.uk>
On Tue, 2017-08-15 at 21:15 +0000, Joseph Myers wrote:
> GCC mainline built for sh4-linux-gnu runs out of memory building a
> glibc test, which calls strncmp with very large constant size
> argument, resulting in the SH inline strncmp expansion trying to
> inline a fully unrolled expansion of strncmp for that size.
>
> This patch limits that fully unrolled expansion to the case of less
> than 32 bytes. This is explicitly *not* trying to be optimal in any
> way (very likely a lower threshold makes sense), just to limit enough
> to avoid the out-of-memory issue in the glibc testsuite.
>
> I have *not* run the GCC testsuite for SH. I have verified that this
> allows the glibc testsuite to build OK, with both GCC mainline and
> GCC 7 branch (and that the included test builds quickly with patched
> GCC, runs out of memory with unpatched GCC).
>
> OK to commit (mainline and GCC 7 branch)?
Yes, that's OK.
This is an older issue. Please also add a reference to PR 67712 in
your commit. Can you also apply it to GCC 6 branch please?
Thanks!
Cheers,
Oleg