From patchwork Tue May 31 15:45:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 628301 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rJyWb0x3Xz9ssM for ; Wed, 1 Jun 2016 01:46:02 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=meOIjgvm; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=Jikk1QHiEzxGPf+6o9Mi2OijHmsLtHpOA9ER17XkJIfYUaBeB/JRJ WtBqa4NtdDRix8Tn4/Ag287EAs0103AnDxfG1jFraloloLdb7CgpJl56sZ5+GS+F jCOw8sWwPCnyD7m5qIPdFHJiItxTcJkef1RxYrwwMhLndi4UxaY5Wk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=oOBr+K9TVBidshfWbR3L/eKVzJI=; b=meOIjgvmqy41p83Akm3s FWkPE+PzL0N4rViFVjfDI+vuJ4FvVnWuBfbs/5ukiDeI0hWz4TwV1J2mUCY9csRE 9tUVDEUp5gCWUSE36IdUYh6ylYMjul313HebxOEmOFMVbfSosvicjfe5U1V7qWyG xDoH1WOjm6D9OPdx/0VM5jc= Received: (qmail 44145 invoked by alias); 31 May 2016 15:45:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 44123 invoked by uid 89); 31 May 2016 15:45:53 -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, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=spc, 3169, H*r:PDT X-Spam-User: qpsmtpd, 2 recipients 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 31 May 2016 15:45:43 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1b7lrP-0002Yn-8e from Thomas_Schwinge@mentor.com ; Tue, 31 May 2016 08:45:39 -0700 Received: from tftp-cs (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Tue, 31 May 2016 08:45:39 -0700 Received: by tftp-cs (Postfix, from userid 49978) id 5EDEFC22F4; Tue, 31 May 2016 08:45:38 -0700 (PDT) From: Thomas Schwinge To: , , Cesar Philippidis , Jakub Jelinek Subject: Remove the unused OMP_CLAUSE_DEVICE_RESIDENT Date: Tue, 31 May 2016 17:45:25 +0200 Message-ID: <87wpmaqlii.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! While working on something else, I came across the following. Cesar, can you please verify that this is really dead code in the Fortran front end, which currently is the only producer of OMP_CLAUSE_DEVICE_RESIDENT? Also, I noticed that the Fortran front end never creates OMP_CLAUSE_MAP with GOMP_MAP_LINK or GOMP_MAP_DEVICE_RESIDENT -- how is OpenACC declare working at all? Cesar, if this is not a simple question to answer, please file a GCC PR, for somebody to have a look later. Jakub, if the following patch is OK, should I also clean it up on release branches as applicable, or just on trunk? commit 65f613d59aca51bc6460eaae7ea19871577a7b26 Author: Thomas Schwinge Date: Tue May 31 15:59:24 2016 +0200 Remove the unused OMP_CLAUSE_DEVICE_RESIDENT gcc/ * tree-core.h (enum omp_clause_code): Remove OMP_CLAUSE_DEVICE_RESIDENT. Adjust all users. --- gcc/fortran/trans-openmp.c | 3 --- gcc/gimplify.c | 5 ----- gcc/omp-low.c | 2 -- gcc/tree-core.h | 3 --- gcc/tree-pretty-print.c | 3 --- gcc/tree.c | 3 --- 6 files changed, 19 deletions(-) Grüße Thomas diff --git gcc/fortran/trans-openmp.c gcc/fortran/trans-openmp.c index c2d89eb..d3276f9 100644 --- gcc/fortran/trans-openmp.c +++ gcc/fortran/trans-openmp.c @@ -1773,9 +1773,6 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses, case OMP_LIST_USE_DEVICE: clause_code = OMP_CLAUSE_USE_DEVICE_PTR; goto add_clause; - case OMP_LIST_DEVICE_RESIDENT: - clause_code = OMP_CLAUSE_DEVICE_RESIDENT; - goto add_clause; add_clause: omp_clauses diff --git gcc/gimplify.c gcc/gimplify.c index 8316bb8..e53a2d3 100644 --- gcc/gimplify.c +++ gcc/gimplify.c @@ -7531,10 +7531,6 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, } break; - case OMP_CLAUSE_DEVICE_RESIDENT: - remove = true; - break; - case OMP_CLAUSE_NOWAIT: case OMP_CLAUSE_ORDERED: case OMP_CLAUSE_UNTIED: @@ -8268,7 +8264,6 @@ gimplify_adjust_omp_clauses (gimple_seq *pre_p, gimple_seq body, tree *list_p, case OMP_CLAUSE__CILK_FOR_COUNT_: case OMP_CLAUSE_ASYNC: case OMP_CLAUSE_WAIT: - case OMP_CLAUSE_DEVICE_RESIDENT: case OMP_CLAUSE_INDEPENDENT: case OMP_CLAUSE_NUM_GANGS: case OMP_CLAUSE_NUM_WORKERS: diff --git gcc/omp-low.c gcc/omp-low.c index a11f44b..77bdb18 100644 --- gcc/omp-low.c +++ gcc/omp-low.c @@ -2200,7 +2200,6 @@ scan_sharing_clauses (tree clauses, omp_context *ctx, install_var_local (decl, ctx); break; - case OMP_CLAUSE_DEVICE_RESIDENT: case OMP_CLAUSE__CACHE_: sorry ("Clause not supported yet"); break; @@ -2368,7 +2367,6 @@ scan_sharing_clauses (tree clauses, omp_context *ctx, case OMP_CLAUSE__GRIDDIM_: break; - case OMP_CLAUSE_DEVICE_RESIDENT: case OMP_CLAUSE__CACHE_: sorry ("Clause not supported yet"); break; diff --git gcc/tree-core.h gcc/tree-core.h index b069928..db5b470 100644 --- gcc/tree-core.h +++ gcc/tree-core.h @@ -316,9 +316,6 @@ enum omp_clause_code { #pragma acc cache (variable-list). */ OMP_CLAUSE__CACHE_, - /* OpenACC clause: device_resident (variable_list). */ - OMP_CLAUSE_DEVICE_RESIDENT, - /* OpenACC clause: gang [(gang-argument-list)]. Where gang-argument-list: [gang-argument-list, ] gang-argument diff --git gcc/tree-pretty-print.c gcc/tree-pretty-print.c index 0e7fdd1..734ecda 100644 --- gcc/tree-pretty-print.c +++ gcc/tree-pretty-print.c @@ -407,9 +407,6 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags) case OMP_CLAUSE__LOOPTEMP_: name = "_looptemp_"; goto print_remap; - case OMP_CLAUSE_DEVICE_RESIDENT: - name = "device_resident"; - goto print_remap; case OMP_CLAUSE_TO_DECLARE: name = "to"; goto print_remap; diff --git gcc/tree.c gcc/tree.c index f4b470b..7511d0a 100644 --- gcc/tree.c +++ gcc/tree.c @@ -281,7 +281,6 @@ unsigned const char omp_clause_num_ops[] = 1, /* OMP_CLAUSE_USE_DEVICE_PTR */ 1, /* OMP_CLAUSE_IS_DEVICE_PTR */ 2, /* OMP_CLAUSE__CACHE_ */ - 1, /* OMP_CLAUSE_DEVICE_RESIDENT */ 2, /* OMP_CLAUSE_GANG */ 1, /* OMP_CLAUSE_ASYNC */ 1, /* OMP_CLAUSE_WAIT */ @@ -353,7 +352,6 @@ const char * const omp_clause_code_name[] = "use_device_ptr", "is_device_ptr", "_cache_", - "device_resident", "gang", "async", "wait", @@ -11764,7 +11762,6 @@ walk_tree_1 (tree *tp, walk_tree_fn func, void *data, WALK_SUBTREE (OMP_CLAUSE_OPERAND (*tp, 1)); /* FALLTHRU */ - case OMP_CLAUSE_DEVICE_RESIDENT: case OMP_CLAUSE_ASYNC: case OMP_CLAUSE_WAIT: case OMP_CLAUSE_WORKER: