This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: math/test-tgmath3 test case size...


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 
type-generic arguments).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]