From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107777 invoked by alias); 4 Nov 2015 17:39:57 -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 107759 invoked by uid 89); 4 Nov 2015 17:39:56 -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,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; Wed, 04 Nov 2015 17:39:55 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1Zu22J-0001fe-IF from Cesar_Philippidis@mentor.com ; Wed, 04 Nov 2015 09:39:51 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Wed, 4 Nov 2015 09:39:51 -0800 Subject: Re: [openacc] acc loop updates in fortran To: Thomas Schwinge References: <5639764A.2000209@codesourcery.com> <87ziytznx9.fsf@kepler.schwinge.homeip.net> CC: "gcc-patches@gcc.gnu.org" , Jakub Jelinek From: Cesar Philippidis Message-ID: <563A42E6.3020301@codesourcery.com> Date: Wed, 04 Nov 2015 17:39: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: <87ziytznx9.fsf@kepler.schwinge.homeip.net> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-SW-Source: 2015-11/txt/msg00384.txt.bz2 On 11/04/2015 09:15 AM, Thomas Schwinge wrote: >> --- a/gcc/fortran/trans-openmp.c >> +++ b/gcc/fortran/trans-openmp.c > >> @@ -3449,16 +3478,28 @@ gfc_trans_oacc_combined_directive (gfc_code *code) >> sizeof (construct_clauses)); >> loop_clauses.collapse = construct_clauses.collapse; >> [...] >> - construct_clauses.collapse = 0; > > Again I'm confused by this, why this is being removed, as earlier in > . I'm not sure why, but gfc_trans_omp_do needs it. It's probably an openmp thing. If you look at gfc_trans_omp_do, you'll see that two sets of clauses are passed into it. code->ext.omp_clauses corresponds to the combined construct clauses and do_clauses are the filtered out ones. So in order to get collapse to work as expected in combined loops, I can't zero out construct_clauses.collapse. >> --- /dev/null >> +++ b/gcc/testsuite/gfortran.dg/goacc/combined-directives.f90 > > I suggest you also merge the existing > gcc/testsuite/gfortran.dg/goacc/combined_loop.f90 into your new test case > file (consistent naming, with the other combined-directives* files). OK, but it depends on what type of things combined_loop.f90 is checking. If it's scanning gimple, it may have to be a separate file. >> @@ -0,0 +1,152 @@ >> +! Exercise combined OpenACC directives. >> + >> +! { dg-do compile } >> +! { dg-options "-fopenacc -fdump-tree-gimple" } >> + >> +! { dg-prune-output "sorry, unimplemented" } > > What's still unimplemented here? Please add a comment, or put the > dg-prune-output directive next to the offending OpenACC directive, so > we'll be sure to remove it later on. I was still seeing those sorry messages. I'll put a comment on them. >> --- /dev/null >> +++ b/gcc/testsuite/gfortran.dg/goacc/loop-5.f95 >> @@ -0,0 +1,363 @@ >> +! { dg-do compile } >> +! { dg-additional-options "-fmax-errors=100" } >> + >> +! { dg-prune-output "sorry, unimplemented" } > > Likewise. > >> +! { dg-prune-output "Error: work-sharing region" } > > What's the intention of this? If we're expecting this error, place > dg-error directives where they belong? Trunk is missing some acc loop nesting verification code in omp-low.c that's present in gomp4. I'm not sure who's going to port that to trunk. I'll add a comment in this test to remove it with the sorry messages when appropriate. >> --- /dev/null >> +++ b/gcc/testsuite/gfortran.dg/goacc/loop-6.f95 >> @@ -0,0 +1,80 @@ >> +! { dg-do compile } >> +! { dg-additional-options "-fmax-errors=100" } >> + >> +! { dg-prune-output "sorry, unimplemented" } > > Likewise. > >> +! { dg-prune-output "Error: work-sharing region" } > > Likewise. > >> --- a/gcc/testsuite/gfortran.dg/goacc/loop-tree-1.f90 >> +++ b/gcc/testsuite/gfortran.dg/goacc/loop-tree-1.f90 >> @@ -3,6 +3,9 @@ >> >> ! test for tree-dump-original and spaces-commas >> >> +! { dg-prune-output "sorry, unimplemented" } > > Likewise. > >> +! { dg-prune-output "Error: work-sharing region" } > > Likewise. > >> --- a/gcc/testsuite/gfortran.dg/goacc/parallel-tree.f95 >> +++ b/gcc/testsuite/gfortran.dg/goacc/parallel-tree.f95 >> @@ -37,4 +37,3 @@ end program test >> >> ! { dg-final { scan-tree-dump-times "map\\(force_deviceptr:u\\)" 1 "original" } } >> ! { dg-final { scan-tree-dump-times "private\\(v\\)" 1 "original" } } >> -! { dg-final { scan-tree-dump-times "firstprivate\\(w\\)" 1 "original" } } > > Which of your source code changes does this change related to? I think Nathan made this change because he found a bug in the test or something. I just included this test because trunk should be capable to handle it now. Cesar