This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][OpenMP] Added omp.sections and omp.section
ClosedPublic

Authored by shraiysh on Sep 30 2021, 8:59 AM.

Details

Summary

Added omp.sections and omp.section operation according to the
section 2.8.1 of OpenMP Standard 5.0.

Diff Detail

Event Timeline

shraiysh created this revision.Sep 30 2021, 8:59 AM
shraiysh requested review of this revision.Sep 30 2021, 8:59 AM

Thanks @shraiysh for this patch. Lots of good work here. For ease of review, could you split this into two patches? One for the re-organisation and the parseClause function and another patch for the sections construct.

Thanks @kiranchandramohan for the input. The first patch is D110903.

shraiysh updated this revision to Diff 380874.EditedOct 20 2021, 1:41 AM

Rebase with main. Adding sections op.

shraiysh retitled this revision from [MLIR][OpenMP] Added omp.sections and parseClauses to [MLIR][OpenMP] Added omp.sections and omp.section.Oct 20 2021, 1:42 AM
shraiysh edited the summary of this revision. (Show Details)
shraiysh updated this revision to Diff 381771.EditedOct 23 2021, 11:01 PM

Rebase with main. This patch is ready for review now.

clementval added inline comments.Oct 25 2021, 7:38 AM
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
880

You should not specify the number of aligned element unless you have a good reason. Same for other SmallVector

shraiysh updated this revision to Diff 383563.Oct 30 2021, 1:08 AM

Addressed comments. Rebase with main.

shraiysh marked an inline comment as done.Oct 30 2021, 1:09 AM
kiranchandramohan requested changes to this revision.Nov 1 2021, 5:30 AM

Thanks @shraiysh for this patch.

I have a few questions/suggestions for change.

mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
155

Can we use the HasParent trait to ensure that the section op have the sections directive as parent?

209

Can this be a SizedRegion<1> region?

Can this specification be moved about the parser declaration?

mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
935

Can this be removed in favour of specifying sizedregion<1>?

This revision now requires changes to proceed.Nov 1 2021, 5:30 AM
shraiysh updated this revision to Diff 383993.Nov 2 2021, 1:12 AM

Addressed comments, rebase with main

kiranchandramohan accepted this revision.Nov 5 2021, 3:49 PM

LGTM. Thanks @shraiysh for this patch.

This revision is now accepted and ready to land.Nov 5 2021, 3:49 PM
shraiysh updated this revision to Diff 385270.Nov 6 2021, 6:42 AM
shraiysh marked an inline comment as done.

Rebase with main

This revision was automatically updated to reflect the committed changes.