diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp --- a/flang/lib/Lower/Bridge.cpp +++ b/flang/lib/Lower/Bridge.cpp @@ -1503,19 +1503,19 @@ //===--------------------------------------------------------------------===// void genFIR(const Fortran::parser::EventPostStmt &stmt) { - TODO(toLocation(), "EventPostStmt lowering"); + genEventPostStatement(*this, stmt); } void genFIR(const Fortran::parser::EventWaitStmt &stmt) { - TODO(toLocation(), "EventWaitStmt lowering"); + genEventWaitStatement(*this, stmt); } void genFIR(const Fortran::parser::FormTeamStmt &stmt) { - TODO(toLocation(), "FormTeamStmt lowering"); + genFormTeamStatement(*this, getEval(), stmt); } void genFIR(const Fortran::parser::LockStmt &stmt) { - TODO(toLocation(), "LockStmt lowering"); + genLockStatement(*this, stmt); } fir::ExtendedValue @@ -1883,23 +1883,23 @@ } void genFIR(const Fortran::parser::SyncAllStmt &stmt) { - TODO(toLocation(), "SyncAllStmt lowering"); + genSyncAllStatement(*this, stmt); } void genFIR(const Fortran::parser::SyncImagesStmt &stmt) { - TODO(toLocation(), "SyncImagesStmt lowering"); + genSyncImagesStatement(*this, stmt); } void genFIR(const Fortran::parser::SyncMemoryStmt &stmt) { - TODO(toLocation(), "SyncMemoryStmt lowering"); + genSyncMemoryStatement(*this, stmt); } void genFIR(const Fortran::parser::SyncTeamStmt &stmt) { - TODO(toLocation(), "SyncTeamStmt lowering"); + genSyncTeamStatement(*this, stmt); } void genFIR(const Fortran::parser::UnlockStmt &stmt) { - TODO(toLocation(), "UnlockStmt lowering"); + genUnlockStatement(*this, stmt); } void genFIR(const Fortran::parser::AssignStmt &stmt) { diff --git a/flang/lib/Lower/Runtime.cpp b/flang/lib/Lower/Runtime.cpp --- a/flang/lib/Lower/Runtime.cpp +++ b/flang/lib/Lower/Runtime.cpp @@ -107,6 +107,64 @@ genUnreachable(builder, loc); } +void Fortran::lower::genFailImageStatement( + Fortran::lower::AbstractConverter &converter) { + fir::FirOpBuilder &builder = converter.getFirOpBuilder(); + mlir::Location loc = converter.getCurrentLocation(); + mlir::FuncOp callee = + fir::runtime::getRuntimeFunc(loc, builder); + builder.create(loc, callee, llvm::None); + genUnreachable(builder, loc); +} + +void Fortran::lower::genEventPostStatement( + Fortran::lower::AbstractConverter &converter, + const Fortran::parser::EventPostStmt &) { + TODO(converter.getCurrentLocation(), "EVENT POST runtime"); +} + +void Fortran::lower::genEventWaitStatement( + Fortran::lower::AbstractConverter &converter, + const Fortran::parser::EventWaitStmt &) { + TODO(converter.getCurrentLocation(), "EVENT WAIT runtime"); +} + +void Fortran::lower::genLockStatement( + Fortran::lower::AbstractConverter &converter, + const Fortran::parser::LockStmt &) { + TODO(converter.getCurrentLocation(), "LOCK runtime"); +} + +void Fortran::lower::genUnlockStatement( + Fortran::lower::AbstractConverter &converter, + const Fortran::parser::UnlockStmt &) { + TODO(converter.getCurrentLocation(), "UNLOCK runtime"); +} + +void Fortran::lower::genSyncAllStatement( + Fortran::lower::AbstractConverter &converter, + const Fortran::parser::SyncAllStmt &) { + TODO(converter.getCurrentLocation(), "SYNC ALL runtime"); +} + +void Fortran::lower::genSyncImagesStatement( + Fortran::lower::AbstractConverter &converter, + const Fortran::parser::SyncImagesStmt &) { + TODO(converter.getCurrentLocation(), "SYNC IMAGES runtime"); +} + +void Fortran::lower::genSyncMemoryStatement( + Fortran::lower::AbstractConverter &converter, + const Fortran::parser::SyncMemoryStmt &) { + TODO(converter.getCurrentLocation(), "SYNC MEMORY runtime"); +} + +void Fortran::lower::genSyncTeamStatement( + Fortran::lower::AbstractConverter &converter, + const Fortran::parser::SyncTeamStmt &) { + TODO(converter.getCurrentLocation(), "SYNC TEAM runtime"); +} + void Fortran::lower::genPauseStatement( Fortran::lower::AbstractConverter &converter, const Fortran::parser::PauseStmt &) {