This is the mail archive of the
mailing list for the glibc project.
Re: math/test-tgmath3 test case size...
- From: Joseph Myers <joseph at codesourcery dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Fri, 16 Feb 2018 21:41:46 +0000
- Subject: Re: math/test-tgmath3 test case size...
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
On Fri, 16 Feb 2018, DJ Delorie wrote:
> In running the glibc testsuite on riscv, I discovered that one math
> test (test-tgmath3) is, well, HUGE. The generated .c file is 10 Mb.
> This takes HOURS to compile on riscv, partly because of the huge, and
> partly because on some targets where linker relaxation is the default,
> link time can be O(size^2).
That sounds like a good testcase to use for optimizing the linker.
That test is deliberately split up into a large number of small functions,
called in a loop from a table listing those functions, to avoid
(hopefully) any compiler performance issues that might arise from
compiling large functions.
> Can this test case be split up somehow? Even just randomly spreading
> it across a few files would be a huge benefit to test time. Given the
> number of tests in math/, "few" could mean "dozens"[*] and still be
> reasonable :-)
It could easily enough be split up by function (list the functions in the
makefile, generate a .c file for each function, include a test that
verifies that the list of functions in the makefile does match the list in
the script itself of functions for which it can generate tests). Tests of
fma make up nearly a third of the total, however (since that has the most
Joseph S. Myers