This is an archive of the discontinued LLVM Phabricator instance.

[flang][OpenMP] Enhance parser support for taskwait construct to OpenMP 5.0
ClosedPublic

Authored by kiranktp on Jun 20 2020, 1:34 AM.

Details

Summary

This patch enhances parser support for taskwait construct to OpenMP 5.0.

2.17.5 taskwait Construct
!$omp taskwait [clause[ [,] clause] ... ]

		where clause is one of the following:
		depend([depend-modifier,]dependence-type : locator-list)

The patch includes code changes and testcase modifications.

Diff Detail

Event Timeline

kiranktp created this revision.Jun 20 2020, 1:34 AM
kiranktp updated this revision to Diff 272683.Jun 23 2020, 5:05 AM
kiranktp edited the summary of this revision. (Show Details)

Corrected the section number to 2.17.5 [from OpenMP 5.0] for taskwait construct

Lint: Pre-merge checks

/mnt/disks/ssd0/agent/llvm-project/flang/lib/Semantics/check-omp-structure.cpp:671:18: warning: invalid case style for variable 'allowed' [readability-identifier-naming]

OmpClauseSet allowed{OmpClause::DEPEND};
             ^~~~~~~
             Allowed

I think I can neglect this warning as i have used the correct naming convention for the variable.
Local variables names should start with lower case. The same has been used in multiple places in the same file.

This looks OK but needs a rebase after @clementval's changes.

This looks OK but needs a rebase after @clementval's changes.

Thanks Kiran. I will rebase this patch and submit again.

kiranktp updated this revision to Diff 278098.Jul 15 2020, 12:57 AM

Rebasing after @clementval's patch and adding appropriate changes needed.

LGTM.

Please wait for approval from @clementval.

This revision is now accepted and ready to land.Jul 15 2020, 1:55 AM
clementval accepted this revision.Jul 15 2020, 6:18 AM

Minor comment but LGTM.

llvm/include/llvm/Frontend/OpenMP/OMP.td
317 ↗(On Diff #278098)

Is it allowed from 5.0 or before? If it is allowed from 5.0 you can specify it like VersionedClause<OMPC_Depend, 50> so it will be accepted (in clang so far) from 5.0 and later. This feature is not used in Flang for the moment.

Minor comment but LGTM.

Thanks for the review @clementval. This is allowed from OpenMP 5.0 and later.
I will do the modification.

kiranktp updated this revision to Diff 278223.Jul 15 2020, 9:37 AM

taskwait has depend clause from OpenMP 5.0 and later.

clementval accepted this revision.Jul 15 2020, 10:07 AM

Still LGTM

This revision was automatically updated to reflect the committed changes.