From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 3E69C3858D35 for ; Tue, 30 Jun 2020 18:52:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3E69C3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Thomas_Schwinge@mentor.com IronPort-SDR: 6BymiwZEPfRstadQYoZhaVzQeFZ79gxrkuudq0umcfEJujAO4ntVcB1aCD8w4dFJELfI7f2nQ4 2iIqGuA0wkqzwUq1uGvnLyo2z7+0uoF9gloEDylyMml5IIkTeQzgWfDhKzT2gMs983z23KXaWa tXXtE9dpXN2gkK6jGWGKcwNfDSypkwI/coNC6o6TSd0awvWP7X8Fqg0dKGl/hm+A2MINu0mudg WvdSDi5ulyj/ShCPRGlz5dpzi7Cu5BHJG+YIFYSq1PaZKZsikpauyr1XAbhLndU123nnLgU54Q Ttg= X-IronPort-AV: E=Sophos;i="5.75,298,1589270400"; d="scan'208";a="52607723" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 30 Jun 2020 10:52:41 -0800 IronPort-SDR: Stnga9i8IyfK/UhDhOorUZQgJuVSIwIUxXTFT1TQC5V1DTHpAVU3OAarF+ottyvDcNnldWLQkf R8FZ4AH6sp4MKaY5Fh4FCAggfusRUv4ePHFp9PdCHXByy1QO2um3MKBZBHP2tslhsdg9QtNGL9 xMxvuV9DyJ3C5Jr8GscQFIFL1WvvJ0B2BthXUecW7c08RKPtMID8w0QApUHWHHxaq3Ef8bvAYb UL1sInjYEzrCzm/rMNqOUlIWr+pEvvpq537ew0DI/zgW5y7bSwGlmNCHS2yrXL4Z89Pw5XDxWb SgE= From: Thomas Schwinge To: Alexandre Oliva CC: Tobias Burnus , Jakub Jelinek , Richard Biener , , , Subject: Re: drop -aux{dir,base}, revamp -dump{dir,base} In-Reply-To: References: <874krkqte6.fsf@euler.schwinge.homeip.net> <2b76fcd8-aaa6-7f7d-9c33-0c41381df658@mentor.com> <1035fcc6-5204-9a09-a61f-4b719c82cd7f@codesourcery.com> User-Agent: Notmuch/0.29.1+93~g67ed7df (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Tue, 30 Jun 2020 20:52:29 +0200 Message-ID: <87zh8kxu6q.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 18:52:44 -0000 Hi Alexandre! On 2020-06-22T11:32:46-0300, Alexandre Oliva wrote: > Here's a consolidated patch, [...] Another small issue here: > --- /dev/null > +++ b/gcc/testsuite/lib/scanoffload.exp > +# 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" !=3D "disable" } { > + eval $prc [lreplace $args $idx $idx "[scoff-format $target [lin= dex $args $idx]]"] > + } > + } else { > + global offload_targets > + foreach target [split $offload_targets ","] { > + eval $prc [lreplace $args $idx $idx "[scoff-format $target [lin= dex $args $idx]]"] > + } > + } > +} > --- a/gcc/testsuite/lib/scanoffloadrtl.exp > +++ b/gcc/testsuite/lib/scanoffloadrtl.exp > @@ -36,12 +37,12 @@ proc scan-offload-rtl-dump { args } { > return > } > if { [llength $args] >=3D 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]" "" > } > } > [...] For example, if there are two 'offload_targets' configured, and you do a: { dg-final { scan-offload-tree-dump-times "(?n)^main\\\._omp_fn\\\.0 " = 1 "optimized" } } ..., you'll get that reported as: PASS: libgomp.c++/scan-offload-1.C scan-offload-tree-dump-times optimiz= ed "(?n)^main\\._omp_fn\\.0 " 1 PASS: libgomp.c++/scan-offload-1.C scan-offload-tree-dump-times optimiz= ed "(?n)^main\\._omp_fn\\.0 " 1 Can we easily get the respective offload target into that, or even full 'scoff-format' if that's easier? I surely could hack up something, but can you see an elegant way? Gr=C3=BC=C3=9Fe Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstra=C3=9Fe 201, 80634 M=C3=BCnch= en / Germany Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thomas = Heurung, Alexander Walter