From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91572 invoked by alias); 23 Nov 2015 10:55:03 -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 91562 invoked by uid 89); 23 Nov 2015 10:55:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 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; Mon, 23 Nov 2015 10:55:02 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35601) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1a0olv-0005ap-Mt for gcc-patches@gnu.org; Mon, 23 Nov 2015 05:54:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0ols-0000hT-3B for gcc-patches@gnu.org; Mon, 23 Nov 2015 05:54:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0olr-0000hP-Ty for gcc-patches@gnu.org; Mon, 23 Nov 2015 05:54:56 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 6A70B30C7A2; Mon, 23 Nov 2015 10:54:55 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-34.ams2.redhat.com [10.36.116.34]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tANAsrtA017233 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 23 Nov 2015 05:54:54 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id tANAspjT021594; Mon, 23 Nov 2015 11:54:51 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id tANAsmK6021593; Mon, 23 Nov 2015 11:54:48 +0100 Date: Mon, 23 Nov 2015 11:02:00 -0000 From: Jakub Jelinek To: Richard Biener Cc: Tom de Vries , Thomas Schwinge , "gcc-patches@gnu.org" Subject: Re: [PATCH] Mark by_ref mem_ref in build_receiver_ref as non-trapping Message-ID: <20151123105448.GX5675@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <55A2618A.7050503@mentor.com> <87io9o1nbn.fsf@kepler.schwinge.homeip.net> <20150713083642.GO1788@tucnak.redhat.com> <55A389AD.5010203@mentor.com> <5650B91A.8030107@mentor.com> <20151123084544.GV5675@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg02680.txt.bz2 On Mon, Nov 23, 2015 at 11:39:26AM +0100, Richard Biener wrote: > On Mon, Nov 23, 2015 at 9:45 AM, Jakub Jelinek wrote: > > On Sat, Nov 21, 2015 at 07:34:02PM +0100, Tom de Vries wrote: > >> Mark by_ref mem_ref in build_receiver_ref as non-trapping > >> > >> 2015-11-21 Tom de Vries > >> > >> * omp-low.c (build_receiver_ref): Mark by_ref mem_ref as non-trapping. > > > > This is ok. > > Are you sure this is properly re-set by inlining via > > /* We cannot propagate the TREE_THIS_NOTRAP flag if we have > remapped a parameter as the property might be valid only > for the parameter itself. */ > if (TREE_THIS_NOTRAP (old) > && (!is_parm (TREE_OPERAND (old, 0)) > || (!id->transform_parameter && is_parm (ptr)))) > TREE_THIS_NOTRAP (*tp) = 1; > > ? Or is this never hoistable to a place where TREE_THIS_NOTRAP is not true > even after inlining? (I presume this is not directly a load via the > static chain pointer?) I don't think inlining is ever around here, this is inside of the outlined bodies of the OpenMP constructs, those are the *.omp_fn* artificial functions called from libgomp, and is used in cases where .omp_data_i->field is not the field itself, but pointer to the original variable. The caller of the libgomp functions that in the end invoke the .omp_fn* functions guarantees that the field in that case is initialized to an address of the original variables, is not NULL or some invalid pointer. Jakub