This is an archive of the discontinued LLVM Phabricator instance.

[Flang][OpenMP 4.5] Add semantic check for OpenMP default clause
ClosedPublic

Authored by yhegde on Oct 21 2020, 2:53 AM.

Details

Summary

Semantic check for OpenMP 4.5 - 2.15.3.1 default clause

Test cases :
omp-parallel-default.f90
omp-task-default.f90
omp-taskloop-default.f90
omp-teams-default.f90

Diff Detail

Event Timeline

yhegde created this revision.Oct 21 2020, 2:53 AM
yhegde requested review of this revision.Oct 21 2020, 2:53 AM

This looks fine. Can all the tests be in a single file?

clementval requested changes to this revision.Oct 21 2020, 11:35 AM
clementval added a subscriber: clementval.
clementval added inline comments.
llvm/include/llvm/Frontend/OpenMP/OMP.td
308

Please remove the occurrence in allowedClauses if you move it here.

328

Please remove the occurrence in allowedClauses if you move it here.

818

Please remove the occurrence in allowedClauses if you move it here.

This revision now requires changes to proceed.Oct 21 2020, 11:35 AM
yhegde updated this revision to Diff 300251.Oct 23 2020, 5:35 AM

Semantic check for OpenMP 4.5 - 2.15.3.1 default clause

Test case:
combined test case - omp-default.f90

clementval accepted this revision.Oct 23 2020, 7:26 AM
clementval added a subscriber: SouraVX.

Changes in OMP.td look good to me. Maybe wait on approval from one of the OpenMP people (maybe @kiranchandramohan @SouraVX can have a look)

This revision is now accepted and ready to land.Oct 23 2020, 7:26 AM

LGTM. A few nit comments. Please check that check-clang also passes (since you changed a shared file, OMP.td).

flang/test/Semantics/omp-default.f90
5

Nit: Please add a positive test as well.

15

Nit: space before shared.

29

Nit: space before shared.

yhegde updated this revision to Diff 300751.Oct 26 2020, 11:35 AM

Positive test cases are added.

@yhegde Can this be submitted? If you need any further inputs please let me know.