OpenACC GIMPLE_OACC_* -- or not?
Thomas Schwinge
thomas@codesourcery.com
Wed Dec 10 10:07:00 GMT 2014
Hi Jakub!
On Wed, 10 Dec 2014 10:57:58 +0100, I wrote:
> In r218568, I applied the following to gomp-4_0-branch:
>
> commit 28629d718a63a782170cfb06a4d0278de0779039
> Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date: Wed Dec 10 09:52:28 2014 +0000
>
> Merge GIMPLE_OACC_KERNELS and GIMPLE_OACC_PARALLEL into GIMPLE_OMP_TARGET.
>
> gcc/
> * gimple.def (GIMPLE_OACC_KERNELS, GIMPLE_OACC_PARALLEL): Merge
> into GIMPLE_OMP_TARGET. Update all users.
Regarding this change:
> --- gcc/gimple-walk.c
> +++ gcc/gimple-walk.c
> @@ -304,36 +304,6 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op,
> return ret;
> break;
>
> - case GIMPLE_OACC_KERNELS:
> - ret = walk_tree (gimple_oacc_kernels_clauses_ptr (stmt), callback_op,
> - wi, pset);
> - if (ret)
> - return ret;
> - ret = walk_tree (gimple_oacc_kernels_child_fn_ptr (stmt), callback_op,
> - wi, pset);
> - if (ret)
> - return ret;
> - ret = walk_tree (gimple_oacc_kernels_data_arg_ptr (stmt), callback_op,
> - wi, pset);
> - if (ret)
> - return ret;
> - break;
> -
> - case GIMPLE_OACC_PARALLEL:
> - ret = walk_tree (gimple_oacc_parallel_clauses_ptr (stmt), callback_op,
> - wi, pset);
> - if (ret)
> - return ret;
> - ret = walk_tree (gimple_oacc_parallel_child_fn_ptr (stmt), callback_op,
> - wi, pset);
> - if (ret)
> - return ret;
> - ret = walk_tree (gimple_oacc_parallel_data_arg_ptr (stmt), callback_op,
> - wi, pset);
> - if (ret)
> - return ret;
> - break;
> -
> case GIMPLE_OMP_CONTINUE:
> ret = walk_tree (gimple_omp_continue_control_def_ptr (stmt),
> callback_op, wi, pset);
..., I noticed that GIMPLE_OMP_TARGET doesn't walk the child_fn and
data_arg. Is that intentional, or should that be done? If the latter
(but this doesn't seem to cause any ill effects -- why?), OK to commit
the following to trunk?
gcc/gimple-walk.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git gcc/gimple-walk.c gcc/gimple-walk.c
index bfa3532..1330c04 100644
--- gcc/gimple-walk.c
+++ gcc/gimple-walk.c
@@ -416,6 +416,14 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op,
pset);
if (ret)
return ret;
+ ret = walk_tree (gimple_omp_target_child_fn_ptr (stmt), callback_op, wi,
+ pset);
+ if (ret)
+ return ret;
+ ret = walk_tree (gimple_omp_target_data_arg_ptr (stmt), callback_op, wi,
+ pset);
+ if (ret)
+ return ret;
break;
case GIMPLE_OMP_TEAMS:
Grüße,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141210/1a205ee8/attachment.sig>
More information about the Gcc-patches
mailing list