This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Libstdc++ testsuite -O0 and -O2 (was: Re: [PATCH] Re: 3 new fails...)


Benjamin Kosnik wrote:

>Running both -O0 and -O2 seems the best solution. How can that be done in 
>dejagnu? I think the java testsuite does this.
>
This happens for many set of test of c,c++,f77 and java. For sure is 
technically doable.

We have to study a bit the directory gcc/gcc/testsuite/lib and take 
inspiration in order to modify dg.exp. g77-dg.exp, in particular, is 
relatively simple and shows how to iterate over various optmization levels:

...

if ![info exists TORTURE_OPTIONS] {
    # It is theoretically beneficial to group all of the O2/O3 options 
together,
    # as in many cases the compiler will generate identical executables for
    # all of them--and the c-torture testsuite will skip testing identical
    # executables multiple times.
    # Also note that -finline-functions is explicitly included in one of the
    # items below, even though -O3 is also specified, because some ports may
    # choose to disable inlining functions by default, even when optimizing.
    set TORTURE_OPTIONS [list \
    { -O0 } \
    { -O1 } \
    { -O2 } \
    { -O3 -fomit-frame-pointer } \
    { -O3 -fomit-frame-pointer -funroll-loops } \
    { -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions } \
    { -O3 -g } \
    { -Os } ]
}

...

But now occurs to me that Gaby may have something to say, right?

Paolo.



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