This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP 5.0] Parsing/sema support for from clause with mapper modifier
ClosedPublic

Authored by lildmh on Feb 25 2019, 10:37 AM.

Details

Summary

This patch implements the parsing and sema support for OpenMP from clause with potential user-defined mappers attached. User defined mapper is a new feature in OpenMP 5.0. A from clause can have an explicit or implicit associated mapper, which instructs the compiler to generate and use customized mapping functions. An example is shown below:

struct S { int len; int *d; };
#pragma omp declare mapper(id: struct S s) map(s, s.d[0:s.len])
struct S ss;
#pragma omp target update from(mapper(id): ss) // use the mapper with name 'id' to map ss from device

Diff Detail

Repository
rL LLVM

Event Timeline

lildmh created this revision.Feb 25 2019, 10:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 25 2019, 10:37 AM
This revision is now accepted and ready to land.Feb 25 2019, 10:43 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 25 2019, 12:33 PM