This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Lowering to MLIR of ordered threads directive
ClosedPublic

Authored by peixin on Apr 12 2022, 4:54 AM.

Details

Summary

This patch supports lowering parse-tree to MLIR of ordered threads
directive following Section 2.19.9 of the OpenMP 5.1 standard.

This is part of the upstreaming effort from the fir-dev branch in [1].
[1] https://github.com/flang-compiler/f18-llvm-project

Diff Detail

Event Timeline

peixin created this revision.Apr 12 2022, 4:54 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 12 2022, 4:54 AM
peixin requested review of this revision.Apr 12 2022, 4:54 AM
peixin added inline comments.Apr 12 2022, 5:08 AM
flang/lib/Lower/OpenMP.cpp
253

Currently, this gaint for loop looks not good. Considering one PR (D121583) has been created to refactor the clause, is it ok to you @shraiysh to also refactor these clauses operands collection in D121583 after upstreaming work finishes?

shraiysh accepted this revision.Apr 12 2022, 5:22 AM

LGTM

flang/lib/Lower/OpenMP.cpp
250

nit: This is going as-is to the builder - in the sense that, there is no handling for simd clause at the moment. So, instead of putting this here, can we simply pass nullptr to the builder while it isn't handled? Having this here gives the impression that it is somehow handled which is not true.

253

Sure, I will try to handle these too while refactoring.

This revision is now accepted and ready to land.Apr 12 2022, 5:22 AM

The test is failing currently.

peixin updated this revision to Diff 422469.Apr 13 2022, 4:27 AM

Fix the CI fail by replacing tco with fir-opt since tco has not been supported fully yet.

peixin added inline comments.Apr 13 2022, 5:06 AM
flang/lib/Lower/OpenMP.cpp
250

Fixed.

253

Thanks.

This revision was automatically updated to reflect the committed changes.