Skip to content

Commit

Permalink
[flang][OpenMP] Upstream lowering of OpenMP Flush construct
Browse files Browse the repository at this point in the history
Note: This patch reflects the work that can be upstreamed from PR's(merged):

- flang-compiler#476

Reviewed By: kiranchandramohan, clementval

Differential Revision: https://reviews.llvm.org/D90048
  • Loading branch information
SouraVX committed Oct 23, 2020
1 parent b1b2c6a commit e7d3774
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion flang/lib/Lower/OpenMP.cpp
Expand Up @@ -104,7 +104,16 @@ genOMP(Fortran::lower::AbstractConverter &converter,
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("");
Expand Down

0 comments on commit e7d3774

Please sign in to comment.