From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23866 invoked by alias); 17 Mar 2016 16:25:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 23849 invoked by uid 89); 17 Mar 2016 16:25:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=1887, sk:static, pg, 177,7 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 17 Mar 2016 16:25:09 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38960) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1agajS-0000wj-W3 for gcc-patches@gnu.org; Thu, 17 Mar 2016 12:25:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agajP-0002gG-OK for gcc-patches@gnu.org; Thu, 17 Mar 2016 12:25:06 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:63798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agajP-0002bs-Fp for gcc-patches@gnu.org; Thu, 17 Mar 2016 12:25:03 -0400 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1agajJ-00079b-4F from Thomas_Schwinge@mentor.com ; Thu, 17 Mar 2016 09:24:57 -0700 Received: from tftp-cs (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Thu, 17 Mar 2016 09:24:56 -0700 Received: by tftp-cs (Postfix, from userid 49978) id 34097C1D41; Thu, 17 Mar 2016 09:24:56 -0700 (PDT) From: Thomas Schwinge To: Tom de Vries , "gcc-patches@gnu.org" , Jakub Jelinek CC: Jeff Law Subject: Re: [patch, driver] Ignore -ftree-parallelize-loops={0,1} In-Reply-To: <55A4CA09.5060107@mentor.com> References: <559B8565.6030806@mentor.com> <55A399D8.60300@mentor.com> <55A49620.9070501@redhat.com> <55A4CA09.5060107@mentor.com> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Thu, 17 Mar 2016 16:28:00 -0000 Message-ID: <871t79t6lr.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 X-SW-Source: 2016-03/txt/msg01023.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 8770 Hi! On Tue, 14 Jul 2015 10:36:25 +0200, Tom de Vries w= rote: > On 14/07/15 06:54, Jeff Law wrote: > > On 07/13/2015 04:58 AM, Tom de Vries wrote: > >> On 07/07/15 09:53, Tom de Vries wrote: > >>> currently, we have these spec strings in gcc/gcc.c involving > >>> ftree-parallelize-loops: > >>> ... > >>> %{fopenacc|fopenmp|ftree-parallelize-loops=3D*:%:include(libgomp.spec= )%(link_gomp)} > >>> > >>> > >>> > >>> %{fopenacc|fopenmp|ftree-parallelize-loops=3D*:-pthread}" > >>> ... > >>> > >>> Actually, ftree-parallelize-loops=3D{0,1} means that no parallelizati= on is > >>> done, but these spec strings still get activated for these values. > >>> > >>> > >>> Attached patch fixes that, by introducing a spec function gt (short f= or > >>> greather than), and using it in the spec lines. > Committed the patch using the gt function, as attached (formatting=20 > fixed, ChangeLog entry added). > Ignore -ftree-parallelize-loops=3D{0,1} using gt >=20 > 2015-07-14 Tom de Vries >=20 > * gcc.c (greater_than_spec_func): Declare forward. > (LINK_COMMAND_SPEC, GOMP_SELF_SPECS): Use gt to ignore > -ftree-parallelize-loops=3D{0,1}. > (static_spec_functions): Add greater_than_spec_func function with name > "gt". > (greater_than_spec_func): New function. I recently noticed that this change failed to update the instances of ftree-parallelize-loops in other spec strings. I can't easily test my proposed changes, but I just mechanically changed "ftree-parallelize-loops=3D*" to "%:gt(%{ftree-parallelize-loops=3D*:%*} 1)" (which is the spelling to use after Jakub's "[PATCH] Fix driver handling of multiple -ftree-parallelize-loops=3D options (PR driver/69805)", ). OK to commit? commit df7d7943ae64f6df74d360e71f7c495c78647fda Author: Thomas Schwinge Date: Thu Mar 17 17:17:36 2016 +0100 Complete changes to "Ignore -ftree-parallelize-loops=3D{0,1} using gt" =20=20=20=20 Apply the r225764 and r233573 changes to all relevant spec strings. =20=20=20=20 gcc/ * config/arc/arc.h (LINK_COMMAND_SPEC): Use gt to ignore -ftree-parallelize-loops=3D{0,1}. * config/darwin.h (LINK_COMMAND_SPEC_A): Likewise. * config/i386/mingw32.h (GOMP_SELF_SPECS): Likewise. * config/ia64/hpux.h (LIB_SPEC): Likewise. * config/pa/pa-hpux11.h (LIB_SPEC): Likewise. * config/pa/pa64-hpux.h (LIB_SPEC): Likewise. --- gcc/config/arc/arc.h | 3 ++- gcc/config/darwin.h | 2 +- gcc/config/i386/mingw32.h | 2 +- gcc/config/ia64/hpux.h | 2 +- gcc/config/pa/pa-hpux11.h | 2 +- gcc/config/pa/pa64-hpux.h | 12 ++++++------ 6 files changed, 12 insertions(+), 11 deletions(-) diff --git gcc/config/arc/arc.h gcc/config/arc/arc.h index 21c049f..1c2a38d 100644 --- gcc/config/arc/arc.h +++ gcc/config/arc/arc.h @@ -188,7 +188,8 @@ along with GCC; see the file COPYING3. If not see %(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} = %{r}\ %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\ - %{fopenacc|fopenmp|ftree-parallelize-loops=3D*:%:include(libgomp.spec)= %(link_gomp)}\ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=3D*:%*} 1):\ + %:include(libgomp.spec)%(link_gomp)}\ %(mflib)\ %{fprofile-arcs|fprofile-generate|coverage:-lgcov}\ %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ diff --git gcc/config/darwin.h gcc/config/darwin.h index 9f686d3..c9981b8 100644 --- gcc/config/darwin.h +++ gcc/config/darwin.h @@ -177,7 +177,7 @@ extern GTY(()) int darwin_ms_struct; %{o*}%{!o:-o a.out} \ %{!nostdlib:%{!nostartfiles:%S}} \ %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-l= gcov} \ - %{fopenacc|fopenmp|ftree-parallelize-loops=3D*: \ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=3D*:%*} 1): \ %{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.= a%s; : -lgomp } } \ %{fgnu-tm: \ %{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a= %s; : -litm } } \ diff --git gcc/config/i386/mingw32.h gcc/config/i386/mingw32.h index 4ac5f68..e048189 100644 --- gcc/config/i386/mingw32.h +++ gcc/config/i386/mingw32.h @@ -207,7 +207,7 @@ do { \ =20 /* mingw32 uses the -mthreads option to enable thread support. */ #undef GOMP_SELF_SPECS -#define GOMP_SELF_SPECS "%{fopenacc|fopenmp|ftree-parallelize-loops=3D*: "= \ +#define GOMP_SELF_SPECS "%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops= =3D*:%*} 1): " \ "-mthreads -pthread}" #undef GTM_SELF_SPECS #define GTM_SELF_SPECS "%{fgnu-tm:-mthreads -pthread}" diff --git gcc/config/ia64/hpux.h gcc/config/ia64/hpux.h index 8b90c99..008c4f6 100644 --- gcc/config/ia64/hpux.h +++ gcc/config/ia64/hpux.h @@ -92,7 +92,7 @@ do { \ #undef LIB_SPEC #define LIB_SPEC \ "%{!shared: \ - %{mt|pthread:%{fopenacc|fopenmp|ftree-parallelize-loops=3D*:-lrt} -lp= thread} \ + %{mt|pthread:%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=3D*:%*= } 1):-lrt} -lpthread} \ %{p:%{!mlp64:-L/usr/lib/hpux32/libp} \ %{mlp64:-L/usr/lib/hpux64/libp} -lprof} \ %{pg:%{!mlp64:-L/usr/lib/hpux32/libp} \ diff --git gcc/config/pa/pa-hpux11.h gcc/config/pa/pa-hpux11.h index 3e5207a..600b677 100644 --- gcc/config/pa/pa-hpux11.h +++ gcc/config/pa/pa-hpux11.h @@ -147,7 +147,7 @@ along with GCC; see the file COPYING3. If not see #undef LIB_SPEC #define LIB_SPEC \ "%{!shared:\ - %{fopenacc|fopenmp|ftree-parallelize-loops=3D*:\ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=3D*:%*} 1):\ %{static:-a archive_shared} -lrt %{static:-a archive}}\ %{mt|pthread:-lpthread} -lc\ %{static:%{!nolibdld:-a archive_shared -ldld -a archive -lc}\ diff --git gcc/config/pa/pa64-hpux.h gcc/config/pa/pa64-hpux.h index a5ccb4a..279406a 100644 --- gcc/config/pa/pa64-hpux.h +++ gcc/config/pa/pa64-hpux.h @@ -58,21 +58,21 @@ along with GCC; see the file COPYING3. If not see #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GNU_LD) #define LIB_SPEC \ "%{!shared:\ - %{!p:%{!pg:%{fopenacc|fopenmp|ftree-parallelize-loops=3D*:\ + %{!p:%{!pg:%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=3D*:%*} = 1):\ %{static:-a shared} -lrt %{static:-a archive}}\ %{mt|pthread:-lpthread} -lc\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\ %{!mt:%{!pthread:-a shared -lc -a archive}}}}}\ %{p:%{!pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\ -lprof %{static:-a archive}\ - %{fopenacc|fopenmp|ftree-parallelize-loops=3D*:\ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=3D*:%*} 1):\ %{static:-a shared} -lrt %{static:-a archive}}\ %{mt|pthread:-lpthread} -lc\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\ %{!mt:%{!pthread:-a shared -lc -a archive}}}}}\ %{pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\ -lgprof %{static:-a archive}\ - %{fopenacc|fopenmp|ftree-parallelize-loops=3D*:\ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=3D*:%*} 1):\ %{static:-a shared} -lrt %{static:-a archive}}\ %{mt|pthread:-lpthread} -lc\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\ @@ -81,21 +81,21 @@ along with GCC; see the file COPYING3. If not see #else #define LIB_SPEC \ "%{!shared:\ - %{!p:%{!pg:%{fopenacc|fopenmp|ftree-parallelize-loops=3D*:\ + %{!p:%{!pg:%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=3D*:%*} = 1):\ %{static:-a shared} -lrt %{static:-a archive}}\ %{mt|pthread:-lpthread} -lc\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\ %{!mt:%{!pthread:-a shared -lc -a archive}}}}}\ %{p:%{!pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\ -lprof %{static:-a archive}\ - %{fopenacc|fopenmp|ftree-parallelize-loops=3D*:\ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=3D*:%*} 1):\ %{static:-a shared} -lrt %{static:-a archive}}\ %{mt|pthread:-lpthread} -lc\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\ %{!mt:%{!pthread:-a shared -lc -a archive}}}}}\ %{pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\ -lgprof %{static:-a archive}\ - %{fopenacc|fopenmp|ftree-parallelize-loops=3D*:\ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=3D*:%*} 1):\ %{static:-a shared} -lrt %{static:-a archive}}\ %{mt|pthread:-lpthread} -lc\ %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\ Gr=C3=BC=C3=9Fe Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJW6tpQAAoJEK3/DN1sMFFt5JYIALn8JfoQ1J/st/mE8/o5AtEr jvYVy79nt0fIiopO61+Jj1fYwRkx5N6jlypjYGKx6CgUfU80tAKpQKCgK7+jOsZU X/BHyDkEunNYHH/J+Y5ElxaWI2K0K1Xrd4VOEIJMoVg1PjwQtuKRILxqQDo4QsEs iZM7wDTm9QQTfOP3V6jqjiYWLAPQjeC0UIw5TbyJExp0SY5gjG+vCoaDPI+e61Pm 3Q+fD0LPu/w9oIPQxFlKRl+KjOj6Olh+Pk2vG+90Xu4l13GZQtm7ktYwbr/3uipu FFdTEJk8rOy6trNETiWD1msKWcDucEKSpQ+hkyzyqUIwiKeOznJetqdNiPAvNfs= =H2Mu -----END PGP SIGNATURE----- --=-=-=--