Next: compat Testing, Previous: gcov Testing, Up: Testsuites
The file profopt.exp provides language-independent support for checking correct execution of a test built with profile-directed optimization. This testing requires that a test program be built and executed twice. The first time it is compiled to generate profile data, and the second time it is compiled to use the data that was generated during the first execution. The second execution is to verify that the test produces the expected results.
To check that the optimization actually generated better code, a test can be built and run a third time with normal optimizations to verify that the performance is better with the profile-directed optimizations. profopt.exp has the beginnings of this kind of support.
profopt.exp provides generic support for profile-directed optimizations. Each set of tests that uses it provides information about a specific optimization:
tool
profile_option
feedback_option
prof_ext
PROFOPT_OPTIONS
{ dg-final-generate {
local-directive } }
dg-final
, but the
local-directive is run after the generation of profile data.
{ dg-final-use {
local-directive } }