From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28121 invoked by alias); 22 Jun 2015 14:11:38 -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 28099 invoked by uid 89); 22 Jun 2015 14:11:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 22 Jun 2015 14:11:37 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 2C9B23CB27A; Mon, 22 Jun 2015 14:11:36 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-82.ams2.redhat.com [10.36.116.82]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5MEBYU4009223 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 Jun 2015 10:11:35 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t5MEBWfm002146; Mon, 22 Jun 2015 16:11:33 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t5MEBVJQ002145; Mon, 22 Jun 2015 16:11:31 +0200 Date: Mon, 22 Jun 2015 14:25:00 -0000 From: Jakub Jelinek To: Bernd Schmidt Cc: Thomas Schwinge , gcc-patches@gcc.gnu.org, Nathan Sidwell , Julian Brown Subject: Re: [gomp4] Preserve NVPTX "reconvergence" points Message-ID: <20150622141131.GY10247@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20150528150635.7bd5db23@octopus> <20150528142011.GN10247@tucnak.redhat.com> <87pp5kg3js.fsf@schwinge.name> <20150528150802.GO10247@tucnak.redhat.com> <5583E68A.9020608@codesourcery.com> <20150619122557.GO10247@tucnak.redhat.com> <5584132A.6080108@codesourcery.com> <20150619134529.GP10247@tucnak.redhat.com> <558814DD.2050502@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <558814DD.2050502@codesourcery.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg01427.txt.bz2 On Mon, Jun 22, 2015 at 03:59:57PM +0200, Bernd Schmidt wrote: > On 06/19/2015 03:45 PM, Jakub Jelinek wrote: > >I actually believe having some optimization passes in between the ompexp > >and the lowering of the IR into the form PTX wants is highly desirable, > >the form with the worker-single or vector-single mode lowered will contain > >too complex CFG for many optimizations to be really effective, especially > >if it uses abnormal edges. E.g. inlining supposedly would have harder job > >etc. What exact unpredictable effects do you fear? > > Mostly the ones I can't predict. But let's take one example, LICM: let's say > you pull some assignment out of a loop, then you find yourself in one of two > possible situations: either it's become not actually available inside the > loop (because the data and control flow is not described correctly and the > compiler doesn't know what's going on), or, to avoid that, you introduce Why do you think that would happen? E.g. for non-addressable gimple types you'd most likely just have a PHI for it on the loop. > additional broadcasting operations when entering the loop, which might be > quite expensive. If the PHI has cheap initialization, there is not a problem to emit it as initialization in the loop instead of a broadcast (kind like RA rematerialization). And by actually adding such an optimization, you help even code that has computation in a vector-single code and uses it in vector acc loop. Jakub