From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24575 invoked by alias); 18 Feb 2015 09:05:37 -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 24563 invoked by uid 89); 18 Feb 2015 09:05:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Feb 2015 09:05:35 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1YO0ZX-0005Xx-Ig from Thomas_Schwinge@mentor.com ; Wed, 18 Feb 2015 01:05:31 -0800 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Wed, 18 Feb 2015 09:05:29 +0000 From: Thomas Schwinge To: Jakub Jelinek , Richard Biener CC: Jan Hubicka , Ilya Verbin , Bernd Schmidt , Subject: Re: nvptx offloading patches [3/n], RFD In-Reply-To: <20150216214349.GR1746@tucnak.redhat.com> References: <5454CAB9.3040907@codesourcery.com> <20150204113817.GO1746@tucnak.redhat.com> <20150216210812.GO1746@tucnak.redhat.com> <5388429A-DE44-4C08-8A19-D42B6E00C0A6@gmail.com> <20150216214349.GR1746@tucnak.redhat.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) Date: Wed, 18 Feb 2015 09:05:00 -0000 Message-ID: <87sie3egj4.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2015-02/txt/msg01072.txt.bz2 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 833 Hi! On Mon, 16 Feb 2015 22:08:12 +0100, Jakub Jelinek wrote: > On Mon, Feb 09, 2015 at 11:20:00AM +0100, Richard Biener wrote: > > I think (also communicated that on IRC) we should instead try not strea= ming > > machine-modes at all but generating them at stream-in time via layout_t= ype > > or layout_decl. >=20 > Here is a WIP prototype for being able to stream a machine mode descripti= on > table and streaming it back in. [...] Many thanks for that! (I had modified Bernd's patch to be less intrusive, see attached, but of course that didn't resolve its design problem.) On Mon, 16 Feb 2015 22:43:49 +0100, Jakub Jelinek wrote: > [updated patch] No regressions with --enable-offload-targets=3Dnvptx-none=3D[...],x86_64-intelmicemul-linux-gnu= =3D[...]. Gr=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=modes-less-intrusive.patch Content-Transfer-Encoding: quoted-printable Content-length: 3041 commit 97a1ad0d3a96321ded8fad5e3a3cc75b46970bfa Author: Thomas Schwinge Date: Fri Feb 13 19:51:09 2015 +0100 Use the offload host CPU's modes.def when building an offloading compil= er: make it less intrusive. diff --git gcc/config.gcc gcc/config.gcc index ebf0ee6..265ac0e 100644 --- gcc/config.gcc +++ gcc/config.gcc @@ -482,15 +482,15 @@ tilepro*-*-*) ;; esac =20 -offload_host_cpu_type=3D${cpu_type} -if test "x${enable_as_accelerator}" !=3D "xno" -then - offload_host_cpu_type=3D`echo ${enable_as_accelerator_for} | sed 's/-.*$/= /'` -fi -case ${offload_host_cpu_type} in -x86_64) - offload_host_cpu_type=3Di386 - ;; +modes_cpu_type=3D${cpu_type} +case ${enable_as_accelerator}:${target} in +yes:nvptx-*-*) + modes_cpu_type=3D`echo ${enable_as_accelerator_for} | sed 's/-.*$//'` + case ${modes_cpu_type} in + x86_64) + modes_cpu_type=3Di386 + ;; + esac esac =20 tm_file=3D${cpu_type}/${cpu_type}.h @@ -499,9 +499,9 @@ then tm_p_file=3D${cpu_type}/${cpu_type}-protos.h fi extra_modes=3D -if test -f ${srcdir}/config/${offload_host_cpu_type}/${offload_host_cpu_ty= pe}-modes.def +if test -f ${srcdir}/config/${modes_cpu_type}/${modes_cpu_type}-modes.def then - extra_modes=3D${offload_host_cpu_type}/${offload_host_cpu_type}-modes.def + extra_modes=3D${modes_cpu_type}/${modes_cpu_type}-modes.def fi if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt then diff --git gcc/config/i386/i386-modes.def gcc/config/i386/i386-modes.def index 766681b..0b6a1f1 100644 --- gcc/config/i386/i386-modes.def +++ gcc/config/i386/i386-modes.def @@ -24,9 +24,6 @@ along with GCC; see the file COPYING3. If not see FRACTIONAL_FLOAT_MODE (XF, 80, 12, ieee_extended_intel_96_format); FLOAT_MODE (TF, 16, ieee_quad_format); =20 -/* This file may be used when building a compiler for an offload target. - Assume that no special floating point options are used. */ -#ifndef ACCEL_COMPILER /* In ILP32 mode, XFmode has size 12 and alignment 4. In LP64 mode, XFmode has size and alignment 16. */ ADJUST_FLOAT_FORMAT (XF, (TARGET_128BIT_LONG_DOUBLE @@ -36,7 +33,6 @@ ADJUST_FLOAT_FORMAT (XF, (TARGET_128BIT_LONG_DOUBLE : &ieee_extended_intel_96_format)); ADJUST_BYTESIZE (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 12); ADJUST_ALIGNMENT (XF, TARGET_128BIT_LONG_DOUBLE ? 16 : 4); -#endif =20 /* Add any extra modes needed to represent the condition code. =20 diff --git gcc/config/nvptx/nvptx.h gcc/config/nvptx/nvptx.h index 9a9954b..c0d97ee 100644 --- gcc/config/nvptx/nvptx.h +++ gcc/config/nvptx/nvptx.h @@ -64,6 +64,14 @@ #define DOUBLE_TYPE_SIZE 64 #define LONG_DOUBLE_TYPE_SIZE 64 =20 +#ifdef ACCEL_COMPILER +/* For ../i386/i386-modes.def. */ +/* See ../i386/unix.h:TARGET_SUBTARGET64_DEFAULT. */ +# define TARGET_128BIT_LONG_DOUBLE (TARGET_ABI64) +/* See ../i386/i386.h:TARGET_96_ROUND_53_LONG_DOUBLE. */ +# define TARGET_96_ROUND_53_LONG_DOUBLE 0 +#endif + #undef SIZE_TYPE #define SIZE_TYPE (TARGET_ABI64 ? "long unsigned int" : "unsigned int") #undef PTRDIFF_TYPE --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJU5FXPAAoJEK3/DN1sMFFt1icH/3rggjWwAPRrIijfRWtQNjv/ 4n5A00uhO6+d5mbJCvSUa4XrzFUR0ta3kNbIdovDBMpdHupxPi6JL0niRnNo4uS6 ZbPqGPHRwdkP7yJTzRbl21ll9iJHsPydH1WcEZknVgD70plsPJr3wp/jrkYT9g5P qD5m7RDUPGDUiSqciX7xa388YszuMmXwzzMXuAzIvDktoL3FPJXqGbsx7nxsFN8G 1VLjcEMlA1TOTO14plv3HGZXAoXBG81tKOF9imwElniG+mJ3XWZQQzOkbnyKSw2y Ts0alDMfCdlUTjapRbypLPMs86A4RjwgL4GKE72jE8dglIlOAbt2m16EnOCakGo= =yTkk -----END PGP SIGNATURE----- --==-=-=--