This is an archive of the discontinued LLVM Phabricator instance.

[Flang][OpenMP] Lower schedule modifiers for worksharing loop
ClosedPublic

Authored by kiranchandramohan on Jun 8 2022, 8:15 AM.

Details

Summary

Add support for lowering the schedule modifiers (simd, monotonic,
non-monotonic) in worksharing loops.

Note: This is part of upstreaming from the fir-dev branch of
https://github.com/flang-compiler/f18-llvm-project.

Co-authored-by: Mats Petersson <mats.petersson@arm.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: V Donaldson <vdonaldson@nvidia.com>

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 8 2022, 8:15 AM
kiranchandramohan requested review of this revision.Jun 8 2022, 8:15 AM
flang/lib/Lower/OpenMP.cpp
852

Check: Should None be represented in the IR?

peixin accepted this revision.Jun 8 2022, 11:42 PM

LGTM

flang/lib/Lower/OpenMP.cpp
852

It does not matter. Both are OK. It only checks if there is simd/monotonic/nonmonotonic modifer there. https://github.com/llvm/llvm-project/blob/e6a76a49356efd11f5f36690181f0f60cecb2e01/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp#L822-L828

Also, you don't need to worry about the default behaviors if some clauses such as ordered clause exist or not. OMPIRBuilder will handle it.

This revision is now accepted and ready to land.Jun 8 2022, 11:42 PM
flang/lib/Lower/OpenMP.cpp
852

Thanks @peixin.