From: Richard Biener <rguenther@suse.de>
To: Alexandre Oliva <oliva@adacore.com>
Cc: Tobias Burnus <tobias@codesourcery.com>,
Thomas Schwinge <thomas@codesourcery.com>,
Jakub Jelinek <jakub@redhat.com>,
gcc-patches@gcc.gnu.org, ebotcazou@adacore.com,
joseph@codesourcery.com
Subject: Re: drop -aux{dir,base}, revamp -dump{dir,base}
Date: Tue, 23 Jun 2020 10:17:58 +0200 (CEST) [thread overview]
Message-ID: <nycvar.YFH.7.76.2006231017500.4397@zhemvz.fhfr.qr> (raw)
In-Reply-To: <or5zbj892p.fsf@livre.home>
On Mon, 22 Jun 2020, Alexandre Oliva wrote:
> On Jun 22, 2020, Tobias Burnus <tobias@codesourcery.com> wrote:
>
> > On 6/22/20 8:08 AM, Alexandre Oliva wrote:
> >>> I additionally did run the test case manually → files.log for the
> >>> produced files.
> >> This is with -save-temps, right?
>
> > Yes. Without, there are no files left under /tmp and only
> > nvptx-merged-loop.xnvptx-none.mkoffload.309r.mach
> > nvptx-merged-loop.exe
> > in the current directory.
> > (As in the testsuite, -foffload=-fdump-rtl-mach was used.)
>
> >> Interesting, in my test run (native only) I didn't trigger that problem.
> >> +++ b/gcc/testsuite/lib/scanoffload.exp
> >> + if [info set offload_target] {
> >> The 'set' above should be 'exists'.
>
> > UNSUPPORTED:
> > libgomp.oacc-c/../libgomp.oacc-c-c++-common/nvptx-merged-loop.c
> > -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O0
> > PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/nvptx-merged-loop.c
> > -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O2
> > (test for excess errors)
> > PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/nvptx-merged-loop.c
> > -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O2
> > execution test
> > PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/nvptx-merged-loop.c
> > -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O2
> > scan-offload-rtl-dump mach "Merging loop .* into "
> > UNSUPPORTED:
> > libgomp.oacc-c/../libgomp.oacc-c-c++-common/nvptx-merged-loop.c
> > -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable -O2
>
> > Hence, it looks fine now – given:
>
> Yay, thanks.
>
> Here's a consolidated patch, that I've tested myself on x86_64-linux-gnu
> (before consolidation, retesting now) with a toolchain build with all of
> the offload targets built and enabled, but without cuda or ROCm runtimes
> or hardware, only the intelmicemul runtime provided by liboffloadmic.
>
> Ok to install?
OK.
Thanks,
Richard.
>
> handle dumpbase in offloading, adjust testsuite
>
> From: Alexandre Oliva <oliva@adacore.com>
>
> Pass dumpbase on to mkoffloads and their offload-target compiler runs,
> using different suffixes for different offloading targets.
> Obey -save-temps in naming temporary files while at that.
>
> Adjust the testsuite offload dump scanning machinery to look for dump
> files named under the new conventions, iterating internally over all
> configured offload targets, or recognizing libgomp's testsuite's own
> iteration.
>
>
> for gcc/ChangeLog
>
> * colllect-utils.h (dumppfx): New.
> * colllect-utils.c (dumppfx): Likewise.
> * lto-wrapper.c (run_gcc): Set global dumppfx.
> (compile_offload_image): Pass a -dumpbase on to mkoffload.
> * config/nvptx/mkoffload.c (ptx_dumpbase): New.
> (main): Handle incoming -dumpbase. Set ptx_dumpbase. Obey
> save_temps.
> (compile_native): Pass -dumpbase et al to compiler.
> * config/gcn/mkoffload.c (gcn_dumpbase): New.
> (main): Handle incoming -dumpbase. Set gcn_dumpbase. Obey
> save_temps. Pass -dumpbase et al to offload target compiler.
> (compile_native): Pass -dumpbase et al to compiler.
>
> for gcc/testsuite/ChangeLog
>
> * lib/scanoffload.exp: New.
> * lib/scanoffloadrtl.exp: Load it. Replace ".o" with ""
> globally, and use scanoffload's scoff wrapper to fill it in.
> * lib/scanoffloadtree.exp: Likewise.
>
> for libgomp/testsuite/ChangeLog
>
> * lib/libgomp.exp: Load gcc lib scanoffload.exp.
> * lib/libgomp-dg.exp: Drop now-obsolete -save-temps.
> ---
> gcc/collect-utils.c | 1 +
> gcc/collect-utils.h | 1 +
> gcc/config/gcn/mkoffload.c | 51 ++++++++++++++++++++++++++++++---
> gcc/config/nvptx/mkoffload.c | 31 +++++++++++++++++++-
> gcc/lto-wrapper.c | 13 +++++++-
> gcc/testsuite/lib/scanoffload.exp | 45 +++++++++++++++++++++++++++++
> gcc/testsuite/lib/scanoffloadrtl.exp | 49 ++++++++++++++++----------------
> gcc/testsuite/lib/scanoffloadtree.exp | 51 +++++++++++++++++----------------
> libgomp/testsuite/lib/libgomp-dg.exp | 8 -----
> libgomp/testsuite/lib/libgomp.exp | 1 +
> 10 files changed, 185 insertions(+), 66 deletions(-)
> create mode 100644 gcc/testsuite/lib/scanoffload.exp
>
> diff --git a/gcc/collect-utils.c b/gcc/collect-utils.c
> index e85843bc..d4fa2c3 100644
> --- a/gcc/collect-utils.c
> +++ b/gcc/collect-utils.c
> @@ -34,6 +34,7 @@ static char *response_file;
> bool debug;
> bool verbose;
> bool save_temps;
> +const char *dumppfx;
>
>
> /* Notify user of a non-error. */
> diff --git a/gcc/collect-utils.h b/gcc/collect-utils.h
> index e7c955f..6ff7d9d9 100644
> --- a/gcc/collect-utils.h
> +++ b/gcc/collect-utils.h
> @@ -37,6 +37,7 @@ extern void utils_cleanup (bool);
> extern bool debug;
> extern bool verbose;
> extern bool save_temps;
> +extern const char *dumppfx;
>
> /* Provided by the tool itself. */
>
> diff --git a/gcc/config/gcn/mkoffload.c b/gcc/config/gcn/mkoffload.c
> index 4a99d70..14f422e 100644
> --- a/gcc/config/gcn/mkoffload.c
> +++ b/gcc/config/gcn/mkoffload.c
> @@ -41,6 +41,7 @@ static const char *gcn_s1_name;
> static const char *gcn_s2_name;
> static const char *gcn_o_name;
> static const char *gcn_cfile_name;
> +static const char *gcn_dumpbase;
>
> enum offload_abi offload_abi = OFFLOAD_ABI_UNSET;
>
> @@ -496,6 +497,12 @@ compile_native (const char *infile, const char *outfile, const char *compiler)
> obstack_ptr_grow (&argv_obstack, "-save-temps");
> if (verbose)
> obstack_ptr_grow (&argv_obstack, "-v");
> + obstack_ptr_grow (&argv_obstack, "-dumpdir");
> + obstack_ptr_grow (&argv_obstack, "");
> + obstack_ptr_grow (&argv_obstack, "-dumpbase");
> + obstack_ptr_grow (&argv_obstack, gcn_dumpbase);
> + obstack_ptr_grow (&argv_obstack, "-dumpbase-ext");
> + obstack_ptr_grow (&argv_obstack, ".c");
> switch (offload_abi)
> {
> case OFFLOAD_ABI_LP64:
> @@ -611,6 +618,9 @@ main (int argc, char **argv)
> save_temps = true;
> else if (strcmp (argv[i], "-v") == 0)
> verbose = true;
> + else if (strcmp (argv[i], "-dumpbase") == 0
> + && i + 1 < argc)
> + dumppfx = argv[++i];
> }
> if (!(fopenacc ^ fopenmp))
> fatal_error (input_location, "either -fopenacc or -fopenmp must be set");
> @@ -628,11 +638,6 @@ main (int argc, char **argv)
> gcc_unreachable ();
> }
>
> - gcn_s1_name = make_temp_file (".mkoffload.1.s");
> - gcn_s2_name = make_temp_file (".mkoffload.2.s");
> - gcn_o_name = make_temp_file (".mkoffload.hsaco");
> - gcn_cfile_name = make_temp_file (".c");
> -
> /* Build arguments for compiler pass. */
> struct obstack cc_argv_obstack;
> obstack_init (&cc_argv_obstack);
> @@ -656,6 +661,35 @@ main (int argc, char **argv)
> obstack_ptr_grow (&cc_argv_obstack, argv[ix]);
> }
>
> + if (!dumppfx)
> + dumppfx = outname;
> +
> + const char *mko_dumpbase = concat (dumppfx, ".mkoffload", NULL);
> + const char *hsaco_dumpbase = concat (dumppfx, ".mkoffload.hsaco", NULL);
> + gcn_dumpbase = concat (dumppfx, ".c", NULL);
> +
> + if (save_temps)
> + {
> + gcn_s1_name = concat (mko_dumpbase, ".1.s", NULL);
> + gcn_s2_name = concat (mko_dumpbase, ".2.s", NULL);
> + gcn_o_name = hsaco_dumpbase;
> + gcn_cfile_name = gcn_dumpbase;
> + }
> + else
> + {
> + gcn_s1_name = make_temp_file (".mkoffload.1.s");
> + gcn_s2_name = make_temp_file (".mkoffload.2.s");
> + gcn_o_name = make_temp_file (".mkoffload.hsaco");
> + gcn_cfile_name = make_temp_file (".c");
> + }
> +
> + obstack_ptr_grow (&cc_argv_obstack, "-dumpdir");
> + obstack_ptr_grow (&cc_argv_obstack, "");
> + obstack_ptr_grow (&cc_argv_obstack, "-dumpbase");
> + obstack_ptr_grow (&cc_argv_obstack, mko_dumpbase);
> + obstack_ptr_grow (&cc_argv_obstack, "-dumpbase-ext");
> + obstack_ptr_grow (&cc_argv_obstack, "");
> +
> obstack_ptr_grow (&cc_argv_obstack, "-o");
> obstack_ptr_grow (&cc_argv_obstack, gcn_s1_name);
> obstack_ptr_grow (&cc_argv_obstack, NULL);
> @@ -674,6 +708,13 @@ main (int argc, char **argv)
> || strncmp (argv[i], "-march", 6) == 0)
> obstack_ptr_grow (&ld_argv_obstack, argv[i]);
>
> + obstack_ptr_grow (&cc_argv_obstack, "-dumpdir");
> + obstack_ptr_grow (&cc_argv_obstack, "");
> + obstack_ptr_grow (&cc_argv_obstack, "-dumpbase");
> + obstack_ptr_grow (&cc_argv_obstack, hsaco_dumpbase);
> + obstack_ptr_grow (&cc_argv_obstack, "-dumpbase-ext");
> + obstack_ptr_grow (&cc_argv_obstack, "");
> +
> obstack_ptr_grow (&ld_argv_obstack, "-o");
> obstack_ptr_grow (&ld_argv_obstack, gcn_o_name);
> obstack_ptr_grow (&ld_argv_obstack, NULL);
> diff --git a/gcc/config/nvptx/mkoffload.c b/gcc/config/nvptx/mkoffload.c
> index 803b585..efdf9b9 100644
> --- a/gcc/config/nvptx/mkoffload.c
> +++ b/gcc/config/nvptx/mkoffload.c
> @@ -55,6 +55,7 @@ static id_map *var_ids, **vars_tail = &var_ids;
> /* Files to unlink. */
> static const char *ptx_name;
> static const char *ptx_cfile_name;
> +static const char *ptx_dumpbase;
>
> enum offload_abi offload_abi = OFFLOAD_ABI_UNSET;
>
> @@ -369,6 +370,12 @@ compile_native (const char *infile, const char *outfile, const char *compiler)
> obstack_ptr_grow (&argv_obstack, "-save-temps");
> if (verbose)
> obstack_ptr_grow (&argv_obstack, "-v");
> + obstack_ptr_grow (&argv_obstack, "-dumpdir");
> + obstack_ptr_grow (&argv_obstack, "");
> + obstack_ptr_grow (&argv_obstack, "-dumpbase");
> + obstack_ptr_grow (&argv_obstack, ptx_dumpbase);
> + obstack_ptr_grow (&argv_obstack, "-dumpbase-ext");
> + obstack_ptr_grow (&argv_obstack, ".c");
> switch (offload_abi)
> {
> case OFFLOAD_ABI_LP64:
> @@ -486,6 +493,9 @@ main (int argc, char **argv)
> save_temps = true;
> else if (strcmp (argv[i], "-v") == 0)
> verbose = true;
> + else if (strcmp (argv[i], "-dumpbase") == 0
> + && i + 1 < argc)
> + dumppfx = argv[++i];
> }
> if (!(fopenacc ^ fopenmp))
> fatal_error (input_location, "either %<-fopenacc%> or %<-fopenmp%> "
> @@ -521,7 +531,14 @@ main (int argc, char **argv)
> obstack_ptr_grow (&argv_obstack, argv[ix]);
> }
>
> - ptx_cfile_name = make_temp_file (".c");
> + if (!dumppfx)
> + dumppfx = outname;
> +
> + ptx_dumpbase = concat (dumppfx, ".c", NULL);
> + if (save_temps)
> + ptx_cfile_name = ptx_dumpbase;
> + else
> + ptx_cfile_name = make_temp_file (".c");
>
> out = fopen (ptx_cfile_name, "w");
> if (!out)
> @@ -531,7 +548,17 @@ main (int argc, char **argv)
> configurations. */
> if (offload_abi == OFFLOAD_ABI_LP64)
> {
> - ptx_name = make_temp_file (".mkoffload");
> + char *mko_dumpbase = concat (dumppfx, ".mkoffload", NULL);
> + if (save_temps)
> + ptx_name = mko_dumpbase;
> + else
> + ptx_name = make_temp_file (".mkoffload");
> + obstack_ptr_grow (&argv_obstack, "-dumpdir");
> + obstack_ptr_grow (&argv_obstack, "");
> + obstack_ptr_grow (&argv_obstack, "-dumpbase");
> + obstack_ptr_grow (&argv_obstack, mko_dumpbase);
> + obstack_ptr_grow (&argv_obstack, "-dumpbase-ext");
> + obstack_ptr_grow (&argv_obstack, "");
> obstack_ptr_grow (&argv_obstack, "-o");
> obstack_ptr_grow (&argv_obstack, ptx_name);
> obstack_ptr_grow (&argv_obstack, NULL);
> diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
> index 8fbca7c..939a83a 100644
> --- a/gcc/lto-wrapper.c
> +++ b/gcc/lto-wrapper.c
> @@ -830,6 +830,7 @@ compile_offload_image (const char *target, const char *compiler_path,
> unsigned int linker_opt_count)
> {
> char *filename = NULL;
> + char *dumpbase;
> char **argv;
> char *suffix
> = XALLOCAVEC (char, sizeof ("/accel//mkoffload") + strlen (target));
> @@ -853,8 +854,13 @@ compile_offload_image (const char *target, const char *compiler_path,
> "could not find %s in %s (consider using %<-B%>)",
> suffix + 1, compiler_path);
>
> + dumpbase = concat (dumppfx, "x", target, NULL);
> +
> /* Generate temporary output file name. */
> - filename = make_temp_file (".target.o");
> + if (save_temps)
> + filename = concat (dumpbase, ".o", NULL);
> + else
> + filename = make_temp_file (".target.o");
>
> struct obstack argv_obstack;
> obstack_init (&argv_obstack);
> @@ -875,6 +881,9 @@ compile_offload_image (const char *target, const char *compiler_path,
> compiler_opt_count);
> append_diag_options (&argv_obstack, linker_opts, linker_opt_count);
>
> + obstack_ptr_grow (&argv_obstack, "-dumpbase");
> + obstack_ptr_grow (&argv_obstack, dumpbase);
> +
> /* Append options specified by -foffload last. In case of conflicting
> options we expect offload compiler to choose the latest. */
> append_offload_options (&argv_obstack, target, compiler_opts,
> @@ -1298,7 +1307,7 @@ run_gcc (unsigned argc, char *argv[])
> bool linker_output_rel = false;
> bool skip_debug = false;
> unsigned n_debugobj;
> - const char *dumppfx = NULL, *incoming_dumppfx = NULL;
> + const char *incoming_dumppfx = dumppfx = NULL;
> static char current_dir[] = { '.', DIR_SEPARATOR, '\0' };
>
> /* Get the driver and options. */
> diff --git a/gcc/testsuite/lib/scanoffload.exp b/gcc/testsuite/lib/scanoffload.exp
> new file mode 100644
> index 00000000..ec0d7a6
> --- /dev/null
> +++ b/gcc/testsuite/lib/scanoffload.exp
> @@ -0,0 +1,45 @@
> +# Copyright (C) 2020 Free Software Foundation, Inc.
> +
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 3 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with GCC; see the file COPYING3. If not see
> +# <http://www.gnu.org/licenses/>.
> +
> +# Utility for scanning offloading dump output, used by libgomp.exp.
> +
> +# Format an offload dump suffix given the offload target name in
> +# OFFTGT and any suffix, probably empty, in SUFFIX.
> +proc scoff-format { offtgt suffix } {
> + return ".x$offtgt.mkoffload$suffix"
> +}
> +
> +# Wrapper for scan procs.
> +# Argument 0 is the index of the argument to replace when calling
> +# argument 1 with the remaining arguments. Use end-1 or end or so.
> +proc scoff { args } {
> + set idx [lindex $args 0]
> + set prc [lindex $args 1]
> + set args [lreplace $args 0 1]
> +
> + global offload_target
> + if [info exists offload_target] {
> + set target $offload_target
> + if { "$target" != "disable" } {
> + eval $prc [lreplace $args $idx $idx "[scoff-format $target [lindex $args $idx]]"]
> + }
> + } else {
> + global offload_targets
> + foreach target [split $offload_targets ","] {
> + eval $prc [lreplace $args $idx $idx "[scoff-format $target [lindex $args $idx]]"]
> + }
> + }
> +}
> diff --git a/gcc/testsuite/lib/scanoffloadrtl.exp b/gcc/testsuite/lib/scanoffloadrtl.exp
> index 69e4e7c8..be457f7 100644
> --- a/gcc/testsuite/lib/scanoffloadrtl.exp
> +++ b/gcc/testsuite/lib/scanoffloadrtl.exp
> @@ -18,6 +18,7 @@
> # libgomp.exp.
>
> load_lib scandump.exp
> +load_lib scanoffload.exp
>
> # Utility for scanning compiler result, invoked via dg-final.
> # Call pass if pattern is present, otherwise fail.
> @@ -36,12 +37,12 @@ proc scan-offload-rtl-dump { args } {
> return
> }
> if { [llength $args] >= 3 } {
> - scan-dump "offload-rtl" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ".o" \
> - [lindex $args 2]
> + scoff end-1 scan-dump "offload-rtl" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" "" \
> + [lindex $args 2]
> } else {
> - scan-dump "offload-rtl" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ".o"
> + scoff end scan-dump "offload-rtl" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ""
> }
> }
>
> @@ -61,12 +62,12 @@ proc scan-offload-rtl-dump-times { args } {
> return
> }
> if { [llength $args] >= 4 } {
> - scan-dump-times "offload-rtl" [lindex $args 0] [lindex $args 1] \
> - "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 2]" ".o" \
> + scoff end-1 scan-dump-times "offload-rtl" [lindex $args 0] \
> + [lindex $args 1] "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 2]" "" \
> [lindex $args 3]
> } else {
> - scan-dump-times "offload-rtl" [lindex $args 0] [lindex $args 1] \
> - "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 2]" ".o"
> + scoff end scan-dump-times "offload-rtl" [lindex $args 0] \
> + [lindex $args 1] "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 2]" ""
> }
> }
>
> @@ -86,12 +87,12 @@ proc scan-offload-rtl-dump-not { args } {
> return
> }
> if { [llength $args] >= 3 } {
> - scan-dump-not "offload-rtl" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ".o" \
> - [lindex $args 2]
> + scoff end-1 scan-dump-not "offload-rtl" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" "" \
> + [lindex $args 2]
> } else {
> - scan-dump-not "offload-rtl" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ".o"
> + scoff end scan-dump-not "offload-rtl" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ""
> }
> }
>
> @@ -112,12 +113,12 @@ proc scan-offload-rtl-dump-dem { args } {
> return
> }
> if { [llength $args] >= 3 } {
> - scan-dump-dem "offload-rtl" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ".o" \
> - [lindex $args 2]
> + scoff end-1 scan-dump-dem "offload-rtl" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" "" \
> + [lindex $args 2]
> } else {
> - scan-dump-dem "offload-rtl" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ".o"
> + scoff end scan-dump-dem "offload-rtl" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ""
> }
> }
>
> @@ -137,11 +138,11 @@ proc scan-offload-rtl-dump-dem-not { args } {
> return
> }
> if { [llength $args] >= 3 } {
> - scan-dump-dem-not "offload-rtl" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ".o" \
> - [lindex $args 2]
> + scoff end-1 scan-dump-dem-not "offload-rtl" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" "" \
> + [lindex $args 2]
> } else {
> - scan-dump-dem-not "offload-rtl" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ".o"
> + scoff end scan-dump-dem-not "offload-rtl" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]r.[lindex $args 1]" ""
> }
> }
> diff --git a/gcc/testsuite/lib/scanoffloadtree.exp b/gcc/testsuite/lib/scanoffloadtree.exp
> index 76a28d0..e51085c 100644
> --- a/gcc/testsuite/lib/scanoffloadtree.exp
> +++ b/gcc/testsuite/lib/scanoffloadtree.exp
> @@ -18,6 +18,7 @@
> # libgomp.exp.
>
> load_lib scandump.exp
> +load_lib scanoffload.exp
>
> # Utility for scanning compiler result, invoked via dg-final.
> # Call pass if pattern is present, otherwise fail.
> @@ -36,12 +37,12 @@ proc scan-offload-tree-dump { args } {
> return
> }
> if { [llength $args] >= 3 } {
> - scan-dump "offload-tree" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ".o" \
> - [lindex $args 2]
> + scoff end-1 scan-dump "offload-tree" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" "" \
> + [lindex $args 2]
> } else {
> - scan-dump "offload-tree" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ".o"
> + scoff end scan-dump "offload-tree" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ""
> }
> }
>
> @@ -61,12 +62,12 @@ proc scan-offload-tree-dump-times { args } {
> return
> }
> if { [llength $args] >= 4 } {
> - scan-dump-times "offload-tree" [lindex $args 0] [lindex $args 1] \
> - "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 2]" ".o" \
> - [lindex $args 3]
> + scoff end-1 scan-dump-times "offload-tree" [lindex $args 0] \
> + [lindex $args 1] "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 2]" "" \
> + [lindex $args 3]
> } else {
> - scan-dump-times "offload-tree" [lindex $args 0] [lindex $args 1] \
> - "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 2]" ".o"
> + scoff end scan-dump-times "offload-tree" [lindex $args 0] \
> + [lindex $args 1] "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 2]" ""
> }
> }
>
> @@ -86,12 +87,12 @@ proc scan-offload-tree-dump-not { args } {
> return
> }
> if { [llength $args] >= 3 } {
> - scan-dump-not "offload-tree" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ".o" \
> - [lindex $args 2]
> + scoff end-1 scan-dump-not "offload-tree" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" "" \
> + [lindex $args 2]
> } else {
> - scan-dump-not "offload-tree" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ".o"
> + scoff end scan-dump-not "offload-tree" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ""
> }
> }
>
> @@ -112,12 +113,12 @@ proc scan-offload-tree-dump-dem { args } {
> return
> }
> if { [llength $args] >= 3 } {
> - scan-dump-dem "offload-tree" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ".o" \
> - [lindex $args 2]
> + scoff end-1 scan-dump-dem "offload-tree" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" "" \
> + [lindex $args 2]
> } else {
> - scan-dump-dem "offload-tree" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ".o"
> + scoff end scan-dump-dem "offload-tree" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ""
> }
> }
>
> @@ -137,11 +138,11 @@ proc scan-offload-tree-dump-dem-not { args } {
> return
> }
> if { [llength $args] >= 3 } {
> - scan-dump-dem-not "offload-tree" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ".o" \
> - [lindex $args 2]
> + scoff end-1 scan-dump-dem-not "offload-tree" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" "" \
> + [lindex $args 2]
> } else {
> - scan-dump-dem-not "offload-tree" [lindex $args 0] \
> - "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ".o"
> + scoff end scan-dump-dem-not "offload-tree" [lindex $args 0] \
> + "\[0-9\]\[0-9\]\[0-9]t.[lindex $args 1]" ""
> }
> }
> diff --git a/libgomp/testsuite/lib/libgomp-dg.exp b/libgomp/testsuite/lib/libgomp-dg.exp
> index 726b924..ebf78e1 100644
> --- a/libgomp/testsuite/lib/libgomp-dg.exp
> +++ b/libgomp/testsuite/lib/libgomp-dg.exp
> @@ -1,12 +1,4 @@
> proc libgomp-dg-test { prog do_what extra_tool_flags } {
> - # Force the dumpbase for test.c to test.o, such that scan-offload-*-dump
> - # will work.
> - foreach opt $extra_tool_flags {
> - if { [regexp ^-foffload=-fdump- $opt] } {
> - lappend extra_tool_flags "-save-temps"
> - }
> - }
> -
> return [gcc-dg-test-1 libgomp_target_compile $prog $do_what $extra_tool_flags]
> }
>
> diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
> index ee5f0e5..8ccb78f4 100644
> --- a/libgomp/testsuite/lib/libgomp.exp
> +++ b/libgomp/testsuite/lib/libgomp.exp
> @@ -30,6 +30,7 @@ load_gcc_lib scanlang.exp
> load_gcc_lib scanrtl.exp
> load_gcc_lib scantree.exp
> load_gcc_lib scanltranstree.exp
> +load_gcc_lib scanoffload.exp
> load_gcc_lib scanoffloadtree.exp
> load_gcc_lib scanoffloadrtl.exp
> load_gcc_lib scanipa.exp
>
>
>
--
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)
next prev parent reply other threads:[~2020-06-23 8:18 UTC|newest]
Thread overview: 117+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-26 5:30 introduce -fcallgraph-info option Alexandre Oliva
2019-10-26 8:12 ` Richard Biener
2019-10-26 11:21 ` Alexandre Oliva
2019-10-27 9:08 ` Alexandre Oliva
2019-10-28 8:38 ` Richard Biener
2019-10-30 10:12 ` Alexandre Oliva
2019-10-30 11:28 ` Richard Biener
2019-11-02 19:31 ` Alexandre Oliva
2019-11-04 8:28 ` Richard Biener
2019-11-06 10:53 ` Alexandre Oliva
2019-11-20 4:35 ` Alexandre Oliva
2019-11-20 9:16 ` Richard Biener
2019-11-06 15:38 ` Alexandre Oliva
2019-11-07 7:49 ` Richard Biener
2019-11-07 10:50 ` Alexandre Oliva
2019-11-07 11:48 ` Richard Biener
2019-11-07 12:30 ` Alexandre Oliva
2019-11-07 14:02 ` Richard Biener
2019-11-07 22:39 ` Alexandre Oliva
2019-11-08 8:28 ` Richard Biener
2019-11-08 23:12 ` Eric Gallager
2019-11-15 1:34 ` Alexandre Oliva
2019-11-15 1:01 ` Alexandre Oliva
2019-11-15 7:30 ` Alexandre Oliva
2019-11-15 8:08 ` Richard Biener
2019-11-15 22:50 ` Alexandre Oliva
2019-12-03 22:44 ` Alexandre Oliva
2019-12-09 9:41 ` Richard Biener
2019-12-12 1:14 ` Alexandre Oliva
2019-12-25 10:05 ` Alexandre Oliva
2019-12-26 19:00 ` drop -aux{dir,base}, revamp -dump{dir,base} (was: Re: introduce -fcallgraph-info option) Alexandre Oliva
2020-01-09 13:33 ` Richard Biener
2020-01-09 19:09 ` drop -aux{dir,base}, revamp -dump{dir,base} Alexandre Oliva
2020-01-16 11:06 ` Alexandre Oliva
2020-01-16 11:15 ` Alexandre Oliva
2020-01-17 2:14 ` Joseph Myers
2020-01-20 10:38 ` Richard Biener
2020-01-22 1:25 ` Alexandre Oliva
2020-01-22 8:15 ` Richard Biener
2020-01-23 20:06 ` Alexandre Oliva
2020-01-24 1:50 ` Alexandre Oliva
2020-05-19 8:51 ` Alexandre Oliva
2020-05-19 8:59 ` Alexandre Oliva
2020-05-19 9:29 ` Richard Biener
2020-05-19 8:59 ` Alexandre Oliva
2020-05-19 9:30 ` Richard Biener
2020-05-19 9:00 ` Alexandre Oliva
2020-05-19 9:04 ` Richard Biener
2020-05-22 0:32 ` Alexandre Oliva
2020-05-22 6:05 ` Richard Biener
2020-05-26 7:08 ` Alexandre Oliva
2020-05-26 8:52 ` Richard Biener
2020-05-26 9:02 ` Martin Liška
2020-05-26 10:00 ` Alexandre Oliva
2020-05-26 12:14 ` Alexandre Oliva
2020-05-26 13:52 ` Alexandre Oliva
2020-05-26 13:56 ` Richard Biener
2020-05-27 22:05 ` Alexandre Oliva
2020-05-27 23:01 ` Jeff Law
2020-06-02 11:52 ` Alexandre Oliva
2020-06-02 12:02 ` Richard Biener
2020-05-27 1:04 ` Broken build (was: Re: drop -aux{dir,base}, revamp -dump{dir,base}) Hans-Peter Nilsson
2020-05-27 14:30 ` Broken build Alexandre Oliva
2020-05-27 15:04 ` Hans-Peter Nilsson
2020-05-28 0:53 ` Alexandre Oliva
2020-05-28 0:39 ` Anthony Green
2020-06-02 11:29 ` Alexandre Oliva
2020-06-02 14:07 ` Hans-Peter Nilsson
2020-05-27 9:45 ` drop -aux{dir,base}, revamp -dump{dir,base} Andreas Schwab
2020-05-27 10:28 ` Andreas Schwab
2020-05-27 14:41 ` Alexandre Oliva
2020-05-27 14:59 ` Andreas Schwab
2020-06-09 12:29 ` Thomas Schwinge
2020-06-09 12:42 ` BRIG FE testsuite: Fix all dump-scans (Was: Re: drop -aux{dir, base}, revamp -dump{dir, base}) Martin Jambor
2020-06-09 18:31 ` BRIG FE testsuite: Fix all dump-scans (Was: Re: drop -aux{dir,base}, revamp -dump{dir,base}) Mike Stump
2020-06-11 14:28 ` BRIG FE testsuite: Fix all dump-scans (Was: Re: drop -aux{dir, base}, revamp -dump{dir, base}) Martin Jambor
2020-06-12 20:52 ` BRIG FE testsuite: Fix all dump-scans (Was: Re: drop -aux{dir,base}, revamp -dump{dir,base}) Mike Stump
2020-06-10 21:50 ` BRIG FE testsuite: Fix all dump-scans Alexandre Oliva
2020-06-23 9:44 ` drop -aux{dir,base}, revamp -dump{dir,base} Alexandre Oliva
2020-06-23 11:30 ` Martin Jambor
2020-06-09 13:08 ` Thomas Schwinge
2020-06-10 22:24 ` Alexandre Oliva
2020-06-17 10:50 ` Tobias Burnus
2020-06-18 2:58 ` Alexandre Oliva
2020-06-18 6:10 ` Alexandre Oliva
2020-06-18 9:41 ` Tobias Burnus
2020-06-18 10:39 ` Alexandre Oliva
2020-06-18 12:06 ` Tobias Burnus
2020-06-30 16:13 ` Thomas Schwinge
2020-07-14 5:46 ` Alexandre Oliva
2020-07-24 6:08 ` Thomas Schwinge
2020-07-24 17:54 ` Alexandre Oliva
2020-07-14 5:49 ` Alexandre Oliva
2020-06-19 9:53 ` Alexandre Oliva
2020-06-19 16:09 ` Tobias Burnus
2020-06-22 6:08 ` Alexandre Oliva
2020-06-22 7:07 ` Tobias Burnus
2020-06-22 14:32 ` Alexandre Oliva
2020-06-23 8:17 ` Richard Biener [this message]
2020-06-30 16:35 ` Thomas Schwinge
2020-07-24 12:06 ` Thomas Schwinge
2020-06-30 18:52 ` Thomas Schwinge
2020-07-14 4:48 ` Alexandre Oliva
2020-07-24 6:01 ` Thomas Schwinge
2020-07-24 18:00 ` Alexandre Oliva
2023-11-24 12:46 ` testsuite: Add 'only_for_offload_target' wrapper for 'scan-offload-tree-dump' etc. (was: drop -aux{dir,base}, revamp -dump{dir,base}) Thomas Schwinge
2020-06-23 9:50 ` drop -aux{dir,base}, revamp -dump{dir,base} Alexandre Oliva
2020-06-30 16:07 ` Thomas Schwinge
2020-07-23 21:12 ` [PR95720] protect gluefile and wrap_flags with -Wl too (was: Re: drop -aux{dir,base}, revamp -dump{dir,base}) Alexandre Oliva
2020-07-24 6:48 ` Richard Biener
2020-05-26 8:09 ` [wwwdocs] Re: drop -aux{dir,base}, revamp -dump{dir,base} Alexandre Oliva
2019-10-28 23:56 ` introduce -fcallgraph-info option Joseph Myers
2019-10-30 9:22 ` Alexandre Oliva
2019-10-30 9:43 ` Alexandre Oliva
2019-10-30 18:17 ` Joseph Myers
2019-11-06 21:27 ` Thomas Schwinge
2019-11-07 11:23 ` Alexandre Oliva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.YFH.7.76.2006231017500.4397@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=joseph@codesourcery.com \
--cc=oliva@adacore.com \
--cc=thomas@codesourcery.com \
--cc=tobias@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).