[PATCH] D66247: [OpenMP] Fix target map for unused variables

2019-08-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D66247#1630398 , @jdenny wrote: > In D66247#1630352 , @ABataev wrote: > > > Yes, just realized that, defaultmap does not affect explicit firstprivates. > > Then just check `map(a) firstp

[PATCH] D66247: [OpenMP] Fix target map for unused variables

2019-08-14 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D66247#1630352 , @ABataev wrote: > Yes, just realized that, defaultmap does not affect explicit firstprivates. > Then just check `map(a) firstprivate(a)` for `int128` type. Check that it > still has `tofrom` mapping. If so, the

[PATCH] D66247: [OpenMP] Fix target map for unused variables

2019-08-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D66247#1630333 , @jdenny wrote: > In D66247#1630321 , @ABataev wrote: > > > Try `map(a) firstprivate(a) defaultmap(scalar:tofrom)`, where `a` is `int`, > > for example. The variable must

[PATCH] D66247: [OpenMP] Fix target map for unused variables

2019-08-14 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D66247#1630321 , @ABataev wrote: > Try `map(a) firstprivate(a) defaultmap(scalar:tofrom)`, where `a` is `int`, > for example. The variable must be mapped as `tofrom` in this case but, most > probably, will be mapped as `to`.

[PATCH] D66247: [OpenMP] Fix target map for unused variables

2019-08-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D66247#1630287 , @jdenny wrote: > In D66247#1630262 , @ABataev wrote: > > > In D66247#1630245 , @jdenny wrote: > > > > > In D66247#1630196

[PATCH] D66247: [OpenMP] Fix target map for unused variables

2019-08-14 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D66247#1630262 , @ABataev wrote: > In D66247#1630245 , @jdenny wrote: > > > In D66247#1630196 , @ABataev wrote: > > > > > Do we really need to map

[PATCH] D66247: [OpenMP] Fix target map for unused variables

2019-08-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D66247#1630245 , @jdenny wrote: > In D66247#1630196 , @ABataev wrote: > > > Do we really need to map such variables? According to standard, "The map > > clause specifies how an original

[PATCH] D66247: [OpenMP] Fix target map for unused variables

2019-08-14 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D66247#1630196 , @ABataev wrote: > Do we really need to map such variables? According to standard, "The map > clause specifies how an original list item is mapped from the current task’s > data environment to a corresponding li

[PATCH] D66247: [OpenMP] Fix target map for unused variables

2019-08-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Do we really need to map such variables? According to standard, "The map clause specifies how an original list item is mapped from the current task’s data environment to a corresponding list item in the device data environment of the device identified by the construct."

[PATCH] D66247: [OpenMP] Fix target map for unused variables

2019-08-14 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added reviewers: ABataev, jdoerfert, hfinkel, kkwli0. Herald added a subscriber: guansong. Herald added a project: clang. Without this patch, each of the following `map` clauses doesn't map its variable into the target region because the variable is unused in