Limit SH strncmp inline expansion (PR target/78460)
Oleg Endo
oleg.endo@t-online.de
Wed Aug 16 00:58:00 GMT 2017
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
More information about the Gcc-patches
mailing list