aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorJennifer Yu <jennifer.yu@intel.com>2021-08-16 07:18:34 -0700
committerJennifer Yu <jennifer.yu@intel.com>2021-08-19 12:53:47 -0700
commitc274b198668040acc239b349ef1f7820c91a95c8 (patch)
treebe8b4b3cbdfd1e836869a2a3a8bc312f9b16709e /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parentad0f6e1d984067a3dc81c17abcdd2fc3c7ff9946 (diff)
downloadllvm-c274b198668040acc239b349ef1f7820c91a95c8.zip
llvm-c274b198668040acc239b349ef1f7820c91a95c8.tar.gz
llvm-c274b198668040acc239b349ef1f7820c91a95c8.tar.bz2
Add implicit map for a list item appears in a reduction clause.
A new rule is added in 5.0: If a list item appears in a reduction, lastprivate or linear clause on a combined target construct then it is treated as if it also appears in a map clause with a map-type of tofrom. Currently map clauses for all capture variables are added implicitly. But missing for list item of expression for array elements or array sections. The change is to add implicit map clause for array of elements used in reduction clause. Skip adding map clause if the expression is not mappable. Noted: For linear and lastprivate, since only variable name is accepted, the map has been added though capture variables. To do so: During the mappable checking, if error, ignore diagnose and skip adding implicit map clause. The changes: 1> Add code to generate implicit map in ActOnOpenMPExecutableDirective, for omp 5.0 and up. 2> Add extra default parameter NoDiagnose in ActOnOpenMPMapClause: Use that to skip error as well as skip adding implicit map during the mappable checking. Note: there are only tow places need to be check for NoDiagnose. Rest of them either the check is for < omp 5.0 or the error already generated for reduction clause. Differential Revision: https://reviews.llvm.org/D108132
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions