From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79307 invoked by alias); 2 Dec 2015 09:59:02 -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 79293 invoked by uid 89); 2 Dec 2015 09:59:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD 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; Wed, 02 Dec 2015 09:58:59 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48985) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1a44Bd-0000Jg-MV for gcc-patches@gnu.org; Wed, 02 Dec 2015 04:58:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a44Ba-0007DC-3B for gcc-patches@gnu.org; Wed, 02 Dec 2015 04:58:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a44BZ-0007D8-UU for gcc-patches@gnu.org; Wed, 02 Dec 2015 04:58:54 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 8F37C68E31; Wed, 2 Dec 2015 09:58:53 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-34.ams2.redhat.com [10.36.116.34]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB29wqJv006982 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 2 Dec 2015 04:58:53 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id tB29worY003911; Wed, 2 Dec 2015 10:58:50 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id tB29wnM4003910; Wed, 2 Dec 2015 10:58:49 +0100 Date: Wed, 02 Dec 2015 09:59:00 -0000 From: Jakub Jelinek To: Tom de Vries Cc: Richard Biener , "gcc-patches@gnu.org" Subject: Re: [PATCH, 4/16] Implement -foffload-alias Message-ID: <20151202095849.GE5675@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20151111110034.GF5675@tucnak.redhat.com> <5644B84D.6050504@mentor.com> <5645C33B.9080802@mentor.com> <20151113113938.GM5675@tucnak.redhat.com> <565058F0.8040509@mentor.com> <56584191.60704@mentor.com> <565846A8.6000509@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <565846A8.6000509@mentor.com> 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-12/txt/msg00222.txt.bz2 On Fri, Nov 27, 2015 at 01:03:52PM +0100, Tom de Vries wrote: > Handle non-declared variables in kernels alias analysis > > 2015-11-27 Tom de Vries > > * gimplify.c (gimplify_scan_omp_clauses): Initialize > OMP_CLAUSE_ORIG_DECL. > * omp-low.c (install_var_field_1): Handle base_pointers_restrict for > pointers. > (map_ptr_clause_points_to_clause_p) > (nr_map_ptr_clauses_pointing_to_clause): New function. > (omp_target_base_pointers_restrict_p): Handle GOMP_MAP_POINTER. > * tree-pretty-print.c (dump_omp_clause): Print OMP_CLAUSE_ORIG_DECL. > * tree.c (omp_clause_num_ops): Set num_ops for OMP_CLAUSE_MAP to 3. > * tree.h (OMP_CLAUSE_ORIG_DECL): New macro. > > * c-c++-common/goacc/kernels-alias-10.c: New test. > * c-c++-common/goacc/kernels-alias-9.c: New test. I don't like this (mainly the addition of OMP_CLAUSE_ORIG_DECL), but it also sounds wrong to me. The primary question is how do you handle GOMP_MAP_POINTER (which is something we don't use for C/C++ OpenMP anymore, and Fortran OpenMP will stop using it in GCC 7 or 6.2?) on the OpenACC libgomp side, does it work like GOMP_MAP_ALLOC or GOMP_MAP_FORCE_ALLOC? Similarly GOMP_MAP_TO_PSET. If it works like GOMP_MAP_ALLOC (it does on the OpenMP side in target.c, so if something is already mapped, no further pointer assignment happens), then your change looks wrong. If it works like GOMP_MAP_FORCE_ALLOC, then you just should treat GOMP_MAP_POINTER on all OpenACC constructs as opcode that allows the restrict operation. If it should behave differently depending on if the corresponding array section has been mapped with GOMP_MAP_FORCE_* or without it, then supposedly you should use a different code for those two. Jakub