From patchwork Tue Sep 29 15:27:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 523912 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 5327C14016A for ; Wed, 30 Sep 2015 01:28:11 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=i3UoT2r1; 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:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=AWhmjrQm2+Vrcv3pkez5Rs8rWun0I9Uq5ga3IjP76jD1ROl2/Q iL0v6Ju9xBGWjwYCz6N/f2xR4dqlTrosmU9YhsepGktuW6m5LoTXfZK3PC4mDy/g xl7dDXj4q1Stg+caTyoBRscJJCnh7telFFMCFSwgaT1QY8BD7HF1Ug+r8= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=Pds17yKEzhl9lxwjgvt4Zds4oe4=; b=i3UoT2r1P/lB4rG8zquh wiwjNeaVnKPMALZQOO7UpJ5I7RhDKjsO5tUEqa151iLoJ/CH1ST2NXWXtn3J5r2/ 54VPXpRwvmn6V8TkTiiYnQcbkYBY0rgTi4pwWm5dihyebZKYrYe1lKgxYvQbVeDG lBA6ccRnp98Z+QuU5Afz0RU= Received: (qmail 130757 invoked by alias); 29 Sep 2015 15:28:03 -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 130747 invoked by uid 89); 29 Sep 2015 15:28:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=BAYES_00, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qg0-f52.google.com Received: from mail-qg0-f52.google.com (HELO mail-qg0-f52.google.com) (209.85.192.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 29 Sep 2015 15:28:01 +0000 Received: by qgt47 with SMTP id 47so9130307qgt.2 for ; Tue, 29 Sep 2015 08:27:59 -0700 (PDT) X-Received: by 10.140.94.214 with SMTP id g80mr30500425qge.57.1443540479350; Tue, 29 Sep 2015 08:27:59 -0700 (PDT) Received: from ?IPv6:2601:181:c000:c497:a2a8:cdff:fe3e:b48? ([2601:181:c000:c497:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id 142sm9418641qhg.13.2015.09.29.08.27.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Sep 2015 08:27:58 -0700 (PDT) To: GCC Patches Cc: Cesar Philippidis From: Nathan Sidwell Subject: [gomp4] Rename oacc_transform pass Message-ID: <560AADFD.4030103@acm.org> Date: Tue, 29 Sep 2015 11:27:57 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 I've committed this to gomp4 branch. It renames the oacc_transform pass to oacc_device_lower, in line with the (now withdrawn) patch for mainline. I'm preparing a version of the pass for mainline with a different initial use than acc_on_device folding. nathan 2015-09-29 Nathan Sidwell Cesar Philippidis * passes.def: Rename pass_oacc_transform to pass_oacc_device_lower. * tree-pass.h (make_pass_oacc_transform): Rename to ... (make_pass_oacc_device_lower): ... here. * doc/invoke/texi (oaccdevlow): Document tree dump flag. * omp-low.c (execute_oacc_transform): Rename to ... (execute_oacc_device_lower): ... here. (pass_data pass_data_oacc_transform): Rename to ... (pass_data pass_data_oacc_device_lower): ... here. Adjust name. (class pass_oacc_transform): Rename to ... class pass_oacc_device_lower): ... here. (make_pass_oacc_transform): Rename to ... (make_pass_oacc_device_lower): ... here. Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 228241) +++ gcc/doc/invoke.texi (working copy) @@ -1,3 +1,4 @@ + @c Copyright (C) 1988-2015 Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -332,6 +333,7 @@ Objective-C and Objective-C++ Dialects}. -fdump-passes @gol -fdump-statistics @gol -fdump-tree-all @gol +-fdump-tree-accdevlow @gol -fdump-tree-original@r{[}-@var{n}@r{]} @gol -fdump-tree-optimized@r{[}-@var{n}@r{]} @gol -fdump-tree-cfg -fdump-tree-alias @gol @@ -7246,6 +7248,11 @@ is made by appending @file{.slp} to the Dump each function after Value Range Propagation (VRP). The file name is made by appending @file{.vrp} to the source file name. +@item oaccdevlow +@opindex fdump-tree-oaccdevlow +Dump each function after applying device-specific OpenACC transformations. +The file name is made by appending @file{.oaccdevlow} to the source file name. + @item all @opindex fdump-tree-all Enable all the available tree dumps with the flags provided in this option. Index: gcc/passes.def =================================================================== --- gcc/passes.def (revision 228241) +++ gcc/passes.def (working copy) @@ -164,7 +164,7 @@ along with GCC; see the file COPYING3. INSERT_PASSES_AFTER (all_passes) NEXT_PASS (pass_fixup_cfg); NEXT_PASS (pass_lower_eh_dispatch); - NEXT_PASS (pass_oacc_transform); + NEXT_PASS (pass_oacc_device_lower); NEXT_PASS (pass_all_optimizations); PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations) NEXT_PASS (pass_remove_cgraph_callee_edges); Index: gcc/tree-pass.h =================================================================== --- gcc/tree-pass.h (revision 228241) +++ gcc/tree-pass.h (working copy) @@ -411,7 +411,7 @@ extern gimple_opt_pass *make_pass_late_l extern gimple_opt_pass *make_pass_diagnose_omp_blocks (gcc::context *ctxt); extern gimple_opt_pass *make_pass_expand_omp (gcc::context *ctxt); extern gimple_opt_pass *make_pass_expand_omp_ssa (gcc::context *ctxt); -extern gimple_opt_pass *make_pass_oacc_transform (gcc::context *ctxt); +extern gimple_opt_pass *make_pass_oacc_device_lower (gcc::context *ctxt); extern gimple_opt_pass *make_pass_object_sizes (gcc::context *ctxt); extern gimple_opt_pass *make_pass_strlen (gcc::context *ctxt); extern gimple_opt_pass *make_pass_fold_builtins (gcc::context *ctxt); Index: gcc/omp-low.c =================================================================== --- gcc/omp-low.c (revision 228241) +++ gcc/omp-low.c (working copy) @@ -14836,7 +14836,7 @@ oacc_validate_dims (tree fn, tree attrs, point (including the host fallback). */ static unsigned int -execute_oacc_transform () +execute_oacc_device_lower () { tree attrs = get_oacc_fn_attrib (current_function_decl); int dims[GOMP_DIM_MAX]; @@ -15036,10 +15036,10 @@ default_goacc_reduction (gcall *call) namespace { -const pass_data pass_data_oacc_transform = +const pass_data pass_data_oacc_device_lower = { GIMPLE_PASS, /* type */ - "fold_oacc_transform", /* name */ + "accdevlow", /* name */ OPTGROUP_NONE, /* optinfo_flags */ TV_NONE, /* tv_id */ PROP_cfg, /* properties_required */ @@ -15049,11 +15049,11 @@ const pass_data pass_data_oacc_transform TODO_update_ssa | TODO_cleanup_cfg, /* todo_flags_finish */ }; -class pass_oacc_transform : public gimple_opt_pass +class pass_oacc_device_lower : public gimple_opt_pass { public: - pass_oacc_transform (gcc::context *ctxt) - : gimple_opt_pass (pass_data_oacc_transform, ctxt) + pass_oacc_device_lower (gcc::context *ctxt) + : gimple_opt_pass (pass_data_oacc_device_lower, ctxt) {} /* opt_pass methods: */ @@ -15064,17 +15064,17 @@ public: if (!gate) return 0; - return execute_oacc_transform (); + return execute_oacc_device_lower (); } -}; // class pass_oacc_transform +}; // class pass_oacc_device_lower } // anon namespace gimple_opt_pass * -make_pass_oacc_transform (gcc::context *ctxt) +make_pass_oacc_device_lower (gcc::context *ctxt) { - return new pass_oacc_transform (ctxt); + return new pass_oacc_device_lower (ctxt); } #include "gt-omp-low.h"