[PATCH] D90048: [flang][OpenMP] Upstream lowering of OpenMP `Flush` construct

Sourabh Singh Tomar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 08:39:59 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe7d37742a2a5: [flang][OpenMP] Upstream lowering of OpenMP `Flush` construct (authored by SouraVX).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90048/new/

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,16 @@
             genOMP(converter, eval, simpleStandaloneConstruct);
           },
           [&](const Fortran::parser::OpenMPFlushConstruct &flushConstruct) {
-            TODO();
+            SmallVector<Value, 4> operandRange;
+            if (const auto &ompObjectList =
+                    std::get<std::optional<Fortran::parser::OmpObjectList>>(
+                        flushConstruct.t))
+              genObjectList(*ompObjectList, converter, operandRange);
+            if (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.300310.patch
Type: text/x-patch
Size: 1073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201023/8a396cf4/attachment.bin>


More information about the llvm-commits mailing list