* lib/profopt.exp: Make prof_option_list local to profopt-execute.
* g++.dg/tree-prof/tree-prof.exp (PROFOPT_OPTIONS): Define after
including profopt.opt; save and restore existing value.
* g++.dg/bprob/bprob.exp: Likewise.
* gcc.dg/matrix/matrix.exp: Likewise.
* gcc.dg/tree-prof/tree-prof.exp: Likewise.
* gcc.misc-tests/bprob.exp: Likewise; also replace formerly-ignored
PROFOPT_OPTIONS.
From-SVN: r188964
+2012-06-25 Janis Johnson <janisjo@codesourcery.com>
+
+ * lib/profopt.exp: Make prof_option_list local to profopt-execute.
+ * g++.dg/tree-prof/tree-prof.exp (PROFOPT_OPTIONS): Define after
+ including profopt.opt; save and restore existing value.
+ * g++.dg/bprob/bprob.exp: Likewise.
+ * gcc.dg/matrix/matrix.exp: Likewise.
+ * gcc.dg/tree-prof/tree-prof.exp: Likewise.
+ * gcc.misc-tests/bprob.exp: Likewise; also replace formerly-ignored
+ PROFOPT_OPTIONS.
+
2012-06-25 Richard Henderson <rth@redhat.com>
* gcc.dg/pr53749.c: New.
strace $tracelevel
}
-# Override the list defined in profopt.exp.
+# Load support procs.
+load_lib profopt.exp
+
+# Save and override the default list defined in profopt.exp.
+set bprob_save_profopt_options $PROFOPT_OPTIONS
set PROFOPT_OPTIONS [list \
{ -g } \
{ -O0 } \
strace $tracelevel
}
-# Load support procs.
-load_lib profopt.exp
-
set profile_options "-fprofile-arcs"
set feedback_options "-fbranch-probabilities"
profopt-execute $src
}
}
+
+set PROFOPT_OPTIONS $bprob_save_profopt_options
set tool g++
set prof_ext "gcda"
-# Override the list defined in profopt.exp.
-set PROFOPT_OPTIONS [list {}]
-
if $tracelevel then {
strace $tracelevel
}
# Load support procs.
load_lib profopt.exp
+# Save and override the default list defined in profopt.exp.
+set treeprof_save_profopt_options $PROFOPT_OPTIONS
+set PROFOPT_OPTIONS [list {}]
+
# These are globals used by profopt-execute. The first is options
# needed to generate profile data, the second is options to use the
# profile data.
}
profopt-execute $src
}
+
+set PROFOPT_OPTIONS $treeprof_save_profopt_options
set tool gcc
set prof_ext "gcda"
-# Override the list defined in profopt.exp.
-set PROFOPT_OPTIONS [list {}]
-
if $tracelevel then {
strace $tracelevel
}
# Load support procs.
load_lib profopt.exp
+# Save and override the default list defined in profopt.exp.
+set matrix_save_profopt_options $PROFOPT_OPTIONS
+set PROFOPT_OPTIONS [list {}]
+
# These are globals used by profopt-execute. The first is options
# needed to generate profile data, the second is options to use the
# profile data.
profopt-execute $src
}
+set PROFOPT_OPTIONS $matrix_save_profopt_options
set tool gcc
set prof_ext "gcda"
-# Override the list defined in profopt.exp.
-set PROFOPT_OPTIONS [list {}]
-
if $tracelevel then {
strace $tracelevel
}
# Load support procs.
load_lib profopt.exp
+# Save and override the default list defined in profopt.exp.
+set treeprof_save_profopt_options $PROFOPT_OPTIONS
+set PROFOPT_OPTIONS [list {}]
+
# These are globals used by profopt-execute. The first is options
# needed to generate profile data, the second is options to use the
# profile data.
}
profopt-execute $src
}
+
+set PROFOPT_OPTIONS $treeprof_save_profopt_options
set prof_ext "gcda"
set perf_ext tim
-# Override the list defined in profopt.exp.
-set PROFOPT_OPTIONS [list \
- { -g } \
- { -O0 } \
- { -O1 } \
- { -O2 -DPERFTIME } \
- { -O3 -DPERFTIME } \
- { -O3 -g -DPERFTIME } \
- { -Os } ]
-
if $tracelevel then {
strace $tracelevel
}
# Load support procs.
load_lib profopt.exp
+# Save and override the default list defined in profopt.exp.
+set bprob_save_profopt_options $PROFOPT_OPTIONS
+set PROFOPT_OPTIONS [list { -O2 } { -O3 }]
+
set profile_options "-fprofile-arcs"
set feedback_options "-fbranch-probabilities"
profopt-execute $src
}
}
+
+set PROFOPT_OPTIONS $bprob_save_profopt_options
{ -Os } ]
}
-set prof_option_list $PROFOPT_OPTIONS
-
#
# profopt-cleanup -- remove profiling or performance results files.
#
#
proc profopt-execute { src } {
global srcdir tmpdir
- global prof_option_list
+ global PROFOPT_OPTIONS
global tool profile_option feedback_option prof_ext perf_ext perf_delta
global generate_final_code use_final_code
global verbose
error "No feedback option specified for second compile."
}
+ # Use the default option list or one defined for a set of tests.
+ if ![info exists PROFOPT_OPTIONS] {
+ error "PROFOPT_OPTIONS is not defined"
+ }
+ set prof_option_list $PROFOPT_OPTIONS
+
regsub "(?q)$srcdir/" $src "" testcase
# If we couldn't rip $srcdir out of `src' then just do the best we can.
# The point is to reduce the unnecessary noise in the logs. Don't strip