From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70646 invoked by alias); 21 Nov 2015 18:35:00 -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 70624 invoked by uid 89); 21 Nov 2015 18:34:59 -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,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; Sat, 21 Nov 2015 18:34:58 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36941) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1a0Czw-0001PQ-4E for gcc-patches@gnu.org; Sat, 21 Nov 2015 13:34:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0Czr-0001OT-LL for gcc-patches@gnu.org; Sat, 21 Nov 2015 13:34:55 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:62470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0Czr-0001OA-FI for gcc-patches@gnu.org; Sat, 21 Nov 2015 13:34:51 -0500 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 1a0Czo-0004tw-M0 from Tom_deVries@mentor.com ; Sat, 21 Nov 2015 10:34:49 -0800 Received: from [127.0.0.1] (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; Sat, 21 Nov 2015 18:34:47 +0000 Subject: [PATCH] Mark by_ref mem_ref in build_receiver_ref as non-trapping To: Jakub Jelinek , Thomas Schwinge References: <55A2618A.7050503@mentor.com> <87io9o1nbn.fsf@kepler.schwinge.homeip.net> <20150713083642.GO1788@tucnak.redhat.com> <55A389AD.5010203@mentor.com> CC: "gcc-patches@gnu.org" From: Tom de Vries Message-ID: <5650B91A.8030107@mentor.com> Date: Sat, 21 Nov 2015 18:49:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <55A389AD.5010203@mentor.com> Content-Type: multipart/mixed; boundary="------------080905070900090901070100" X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 X-SW-Source: 2015-11/txt/msg02583.txt.bz2 --------------080905070900090901070100 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 894 [ was: Re: [Committed] Mark *.omp_data_i as non-trapping ] On 13/07/15 11:49, Tom de Vries wrote: > [ was: Re: [gomp4, committed] Handle nested loops in kernels regions ] > > On 13/07/15 10:36, Jakub Jelinek wrote: >> On Mon, Jul 13, 2015 at 10:19:56AM +0200, Thomas Schwinge wrote: >>>> We rely on pass_lim to move the *.omp_data_i loads out of the loop >>>> nest. >>>> For the test-case, pass_lim was managing to move the load out of the >>>> inner loop, but not the outer loop, because the load was classified as >>>> 'MOVE_PRESERVE_EXECUTION'. By marking the *.omp_data_i load >>>> non-trapping, it's now classified as 'MOVE_POSSIBLE', and moved out of >>>> the loop nest. This follow-up patch also marks the 'by_ref' mem_ref in build_receiver_ref as non-trapping. Bootstrapped and reg-tested on x86_64. OK for stage3 (because it's needed for the oacc kernels support)? Thanks, - Tom --------------080905070900090901070100 Content-Type: text/x-patch; name="0001-Mark-by_ref-mem_ref-in-build_receiver_ref-as-non-trapping.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="0001-Mark-by_ref-mem_ref-in-build_receiver_ref-as-non-trappi"; filename*1="ng.patch" Content-length: 681 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. --- gcc/omp-low.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 830db75..78f2853 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -1249,7 +1249,10 @@ build_receiver_ref (tree var, bool by_ref, omp_context *ctx) TREE_THIS_NOTRAP (x) = 1; x = omp_build_component_ref (x, field); if (by_ref) - x = build_simple_mem_ref (x); + { + x = build_simple_mem_ref (x); + TREE_THIS_NOTRAP (x) = 1; + } return x; } --------------080905070900090901070100--