From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10368 invoked by alias); 2 Nov 2015 08:43:07 -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 10348 invoked by uid 89); 2 Nov 2015 08:43:06 -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; Mon, 02 Nov 2015 08:43:04 +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 1ZtAhg-0003pG-LY from Thomas_Schwinge@mentor.com ; Mon, 02 Nov 2015 00:43:01 -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; Mon, 2 Nov 2015 08:42:59 +0000 From: Thomas Schwinge To: Jeff Law CC: Cesar Philippidis , Andrew MacLeod , gcc-patches , Jakub Jelinek , Nathan Sidwell , Ilya Verbin , Kirill Yukhin Subject: Offload configurations (was: [patch] New backend header reduction) In-Reply-To: <5633E1AE.1010208@redhat.com> References: <562A8987.2030508@redhat.com> <5633AF4E.6040105@codesourcery.com> <5633B266.1030008@redhat.com> <5633D100.4070509@redhat.com> <5633D1DF.2010002@codesourcery.com> <5633D88E.4080900@acm.org> <5633E1AE.1010208@redhat.com> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Mon, 02 Nov 2015 08:43:00 -0000 Message-ID: <874mh43i7q.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-11/txt/msg00025.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 3301 Hi! On Fri, 30 Oct 2015 15:31:26 -0600, Jeff Law wrote: > On 10/30/2015 02:23 PM, Cesar Philippidis wrote: > > On 10/30/2015 01:20 PM, Andrew MacLeod wrote: > >> On 10/30/2015 02:09 PM, Andrew MacLeod wrote: > >>> On 10/30/2015 01:56 PM, Cesar Philippidis wrote: > >>>> On 10/23/2015 12:24 PM, Jeff Law wrote: > >>>>> On 10/23/2015 10:53 AM, Andrew MacLeod wrote: > >>>>> > >>>> There's a little bit of fallout with this patch when building an > >>>> offloaded compiler for openacc. It looks like cgraph.c needs to incl= ude > >>>> context.h and varpool.c needs context.h and omp-low.h. There's a cou= ple > >>>> of ifdef ENABLE_OFFLOADING which may have gone undetected with your > >>>> script. > >>> If they are defined on the command line or some other way I couldn't > >>> see with the targets I built, then that is the common case when that > >>> happens. I don't think I did any openacc builds. OR maybe I need > >>> to add nvptx to my coverage builds. Perhaps that is best. > >>>> I've bootstrapped the attached patch for an nvptx/x86_64-linux targe= t. > >>>> I'm still testing that toolchain. If the testing comes back clean, is > >>>> this patch OK for trunk? > >> Ah, I see. there is no nvptx target in config-list.mk, so it never got > >> covered. (Now there is, but that's not actually the problem here.) > > Yeah, you need to build two separate compilers. Thomas posted some > > directions here . You could > > probably reproduce it with openmp and Intel's MIC emulation target too. > Oh, there's something specific to the offloading support that needs=20 > context.h, it's not the ptx port. Duh. Anyway, it'd still be good to=20 > get standard builds of the nvptx backend into config-list.mk. >=20 > Not sure how painful it'd be to add the offloading path. Shouldn't actually be difficult: you ought (untested) to be able to configure with, for example, --enable-offload-targets=3Dnvptx-none,x86_64-intelmicemul-linux-gnu even if not actually having built these offloading compilers. (Due to a "strange" requirement of Intel MIC offloading configuration, that "the GCC build reference[s]/depend[s] on the Intel MIC offloading compiler's installation directory (which [thus has to be] built and installed earlier)", , this would fail later on, but as config-list.mk testing only builds the "all-gcc" target, that's not a problem.) So, maybe add to config-list.mk one x86_64-linux-gnu target with --enable-offload-targets=3D[...] to cover code guarded by the ENABLE_OFFLOADING preprocessor conditional. And, maybe add one nvptx-none or x86_64-intelmic-linux-gnu target with --enable-as-accelerator-for=3D[something] to cover code guarded by the ACCEL_COMPILER preprocessor conditional. > This is a great example of why we're trying to minimize/eliminate=20 > conditional compilation :-) Agreed. For the longer term, I think we should get rid of the (only) handful of ENABLE_OFFLOADING and ACCEL_COMPILER preprocessor conditionals. For the former we'll have to find something, but the latter could just be replaced with "if (flag_offload_abi !=3D OFFLOAD_ABI_UNSET)" or similar, I think. Gr=C3=BC=C3=9Fe Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWNyIJAAoJEK3/DN1sMFFt4fEIALyFHrJc/58+j68XioJCNsb4 TnPHq4VNfiYGqCZAbaJCai9hYUPfV2OXpkcBUN6BM9eerB+iohADite4Q2uymXxC ioSjNuTmmJIAFbq9plscgg2WwE53UfnVTLc1siFMFr42RfC5sPNIn/WRCetPgE6b Fbg/AgzWVDmH7+2KUtIWR5bRsE/gDXEGMVFZ2pXAfMtfkHiUptKYGwzAAnpeSNqL hjWUgUriVJzMe/6Fsfop+z1bYEwd8g2SX8OKCJLgYrmkxqaafmsrlMvmqaMBf36u trcorrFXYEOe/ORXRGiEZgeXYg3iTNDIdA8TK0ZLVL4d7KArDlq9QdRz4geLMVo= =wE3t -----END PGP SIGNATURE----- --=-=-=--