Kwok Cheung Yeung wrote:
Subject: [PATCH 03/11] openmp: Add support for iterators in 'target update'
  clauses (C/C++)

This adds support for iterators in 'to' and 'from' clauses in the
'target update' OpenMP directive.
* * *
+         c_parser_error (parser, "%<to%> or %<from%> clause with modifier "
+                                 "other than %<iterator%> or %<present%>");

This should use *%qs' with kind == OMP_CLAUSE_TO ? "to" : "from".

* * *

+         cp_parser_error (parser, "%<to%> or %<from%> clause with "
+                                  "modifier other than %<iterator%> "
+                                  "or %<present%>");

Likewise.

* * *

--- a/libgomp/target.c
+++ b/libgomp/target.c
+ if (short_mapkind)
+    iterators_p = gomp_merge_iterator_maps (&mapnum, &hostaddrs, &sizes,
+                                           &kinds, &iterator_count);
+

I think a "/* OpenMP */" appended to the 'if' line would help code readers.

* * *

The warning issue of previous patch patch also applies here, but I think it will be fixed here as collateral fix. As the code path is the same for those and for zero-trip and reverse-walked loops, I guess ensuring that those are handled properly with map will also automatically apply here such that no extra check is needed.

Otherwise, LGTM. Thanks, Tobias

Reply via email to