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 <nat...@codesourcery.com>
Cesar Philippidis <ce...@codesourcery.com>
* 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"