aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2016-06-23 14:34:04 +0000
committerAndi Kleen <ak@gcc.gnu.org>2016-06-23 14:34:04 +0000
commit7f586d904de25044a08f99669df5bc1ed2fa9f26 (patch)
tree91935af5ca8da3b1809c9bd7bd8d4b7b0af1b0f9 /gcc/testsuite/g++.dg
parent7b72d14a9fc6f99caf54ed7b2a5b567d97bd3bb3 (diff)
downloadgcc-7f586d904de25044a08f99669df5bc1ed2fa9f26.zip
gcc-7f586d904de25044a08f99669df5bc1ed2fa9f26.tar.gz
gcc-7f586d904de25044a08f99669df5bc1ed2fa9f26.tar.bz2
Run profile feedback tests with autofdo
Extend the existing bprob and tree-prof tests to also run with autofdo. The test runtimes are really a bit too short for autofdo, but it's a reasonable sanity check. This only works natively for now. dejagnu doesn't seem to support a wrapper for unix tests, so I had to open code running these tests. That should be ok due to the native run restrictions. gcc/testsuite/: 2016-06-23 Andi Kleen <ak@linux.intel.com> * g++.dg/bprob/bprob.exp: Support autofdo. * g++.dg/tree-prof/tree-prof.exp: dito. * gcc.dg/tree-prof/tree-prof.exp: dito. * gcc.misc-tests/bprob.exp: dito. * gfortran.dg/prof/prof.exp: dito. * lib/profopt.exp: dito. * lib/target-supports.exp: Check for autofdo. From-SVN: r237732
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/bprob/bprob.exp8
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/tree-prof.exp8
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/bprob/bprob.exp b/gcc/testsuite/g++.dg/bprob/bprob.exp
index d555507..4818298 100644
--- a/gcc/testsuite/g++.dg/bprob/bprob.exp
+++ b/gcc/testsuite/g++.dg/bprob/bprob.exp
@@ -53,6 +53,7 @@ if $tracelevel then {
set profile_options "-fprofile-arcs"
set feedback_options "-fbranch-probabilities"
+set profile_wrapper ""
# Main loop.
foreach profile_option $profile_options feedback_option $feedback_options {
@@ -65,4 +66,11 @@ foreach profile_option $profile_options feedback_option $feedback_options {
}
}
+foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.C]] {
+ if ![runtest_file_p $runtests $src] then {
+ continue
+ }
+ auto-profopt-execute $src
+}
+
set PROFOPT_OPTIONS $bprob_save_profopt_options
diff --git a/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp b/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp
index 7a4b5cb..26ee0b3 100644
--- a/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp
+++ b/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp
@@ -44,6 +44,7 @@ set PROFOPT_OPTIONS [list {}]
# profile data.
set profile_option "-fprofile-generate -D_PROFILE_GENERATE"
set feedback_option "-fprofile-use -D_PROFILE_USE"
+set profile_wrapper ""
foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.C]] {
# If we're only testing specific files and this isn't one of them, skip it.
@@ -53,4 +54,11 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.C]] {
profopt-execute $src
}
+foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.C]] {
+ if ![runtest_file_p $runtests $src] then {
+ continue
+ }
+ auto-profopt-execute $src
+}
+
set PROFOPT_OPTIONS $treeprof_save_profopt_options