From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10128 invoked by alias); 20 Oct 2014 11:22:04 -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 10119 invoked by uid 89); 20 Oct 2014 11:22:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_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, 20 Oct 2014 11:22:03 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9KBM0AX027818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 20 Oct 2014 07:22:00 -0400 Received: from tucnak.zalov.cz (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9KBLwDJ003947 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Mon, 20 Oct 2014 07:21:59 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id s9KBLuVR031607; Mon, 20 Oct 2014 13:21:56 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id s9KBLrJ9031605; Mon, 20 Oct 2014 13:21:53 +0200 Date: Mon, 20 Oct 2014 11:26:00 -0000 From: Jakub Jelinek To: Ilya Verbin Cc: Richard Biener , Thomas Schwinge , Jan Hubicka , gcc-patches@gcc.gnu.org, Kirill Yukhin , Ilya Tocar , Andrey Turetskiy , Bernd Schmidt Subject: Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming Message-ID: <20141020112153.GM10376@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20140927181647.GA1819@msticlxl57.ims.intel.com> <20140929011014.GA11758@kam.mff.cuni.cz> <20140929173704.GA7526@msticlxl57.ims.intel.com> <878ul172w5.fsf@schwinge.name> <20141001161332.GB54978@msticlxl57.ims.intel.com> <20141020111935.GA9362@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141020111935.GA9362@msticlxl57.ims.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg01895.txt.bz2 On Mon, Oct 20, 2014 at 03:19:35PM +0400, Ilya Verbin wrote: > > > + /* If '#pragma omp critical' is inside target region, the symbol must > > > + have an 'omp declare target' attribute. */ > > > + omp_context *octx; > > > + for (octx = ctx->outer; octx; octx = octx->outer) > > > + if (is_targetreg_ctx (octx)) > > > + { > > > + DECL_ATTRIBUTES (decl) > > > + = tree_cons (get_identifier ("omp declare target"), > > > + NULL_TREE, DECL_ATTRIBUTES (decl)); > > > > Here - why not set a flag on cgraph_get_node (decl) instead? > > I thought that select_what_to_stream is exactly what you've suggested. > Could you please clarify this? You propose to replace "omp declare target" > attribure with some cgraph node flag like need_offload? But we'll need > need_lto_streaming anyway, since for LTO it should be 1 for all nodes, but for > offloading it should be equal to need_offload. Note, the attribute is created usually by the FEs, at points where cgraph/varpool nodes can't be created yet. So, it is not possible to get rid of the artificial attribute easily, it could be cached in some cgraph/varpool bit field of course. Jakub