[PATCH] D90048: [flang][OpenMP] Upstream lowering of `ParallelOp` clauses
Sourabh Singh Tomar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 23 08:07:29 PDT 2020
SouraVX created this revision.
SouraVX added reviewers: kiranchandramohan, schweitz, clementval, kiranktp, sameeranjoshi.
SouraVX added projects: LLVM, Flang.
Herald added subscribers: llvm-commits, jdoerfert, guansong, yaxunl.
SouraVX requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Note: This patch reflects the work that can be upstreamed from PR's(merged):
- https://github.com/flang-compiler/f18-llvm-project/pull/476
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90048
Files:
flang/lib/Lower/OpenMP.cpp
Index: flang/lib/Lower/OpenMP.cpp
===================================================================
--- flang/lib/Lower/OpenMP.cpp
+++ flang/lib/Lower/OpenMP.cpp
@@ -104,7 +104,17 @@
genOMP(converter, eval, simpleStandaloneConstruct);
},
[&](const Fortran::parser::OpenMPFlushConstruct &flushConstruct) {
- TODO();
+ SmallVector<Value, 4> operandRange;
+ if (auto &ompObjectList =
+ std::get<std::optional<Fortran::parser::OmpObjectList>>(
+ flushConstruct.t))
+ genObjectList(*ompObjectList, converter, operandRange);
+ if (auto &flushMemoryClause = std::get<
+ std::optional<Fortran::parser::OmpFlushMemoryClause>>(
+ flushConstruct.t))
+ TODO("Handle OmpFlushMemoryClause");
+ converter.getFirOpBuilder().create<mlir::omp::FlushOp>(
+ converter.getCurrentLocation(), operandRange);
},
[&](const Fortran::parser::OpenMPCancelConstruct &cancelConstruct) {
TODO("");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90048.300299.patch
Type: text/x-patch
Size: 1115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201023/e06fc580/attachment.bin>
More information about the llvm-commits
mailing list