Library testsuite

Brooks Moses brooks.moses@codesourcery.com
Tue Feb 13 01:57:00 GMT 2007


Tobias Schlüter wrote:
> My intention was to speed up our current testsuite runtimes without 
> sacrificing converage.  Tests of the library fall into two classes: 
> those which exercise the optimizers, and those which don't.  The former 
> are those which test library functionality that is implemented by inline 
> code, the latter are those which are nothing but a series of calls into 
> the library.  While for the former it is worthwhile to cycle through a 
> set of different optimization options, for the latter it isn't.  But the 
> distinction between these two is a moving target: e.g. (IIRC) currently 
> the MVBITS intrinsic expands into a function call, but it is conceivable 
> that someone will find it worthwhile write an inline implementation for it.
> 
> Therefore I decided to play it safe: I divided the libgfortran testsuite 
> into two subdirectories: io/ and intrinsics/.  The tests in io/ are only 
> run with -O2, whereas the tests in intrinsics cycle through the usual 
> set of options.
> 
> Does anybody know a better solution?

I don't think we need to cycle through all of the optimization options, 
even for things that are constant-folded at compile time.  In general, 
either the constant folding is right or it isn't, or there's a bug in 
the middle-end somewhere that's not our problem.  (Though there's a 
minor chance that we'll stick in something that allows incorrect 
optimizations, I suppose.)

Thus, I would think that -O0, -O2, and -O3 -f<everything> would be more 
than sufficient for the constant-folded stuff.  If the testsuite takes a 
long time we could even go down to just -O2 without being too 
unreasonable, I think.

- Brooks



More information about the Fortran mailing list