[flang-dev] OpenMP Semantic checks for combined constructs

David Truby via flang-dev flang-dev at lists.llvm.org
Tue Nov 26 09:21:15 PST 2019


Hi all,

I’ve been looking at the OpenMP semantics checks for combined constructs and I think we need a slight redesign of the OpenMP semantics checks to accommodate these. Currently we’re copying the checks from sub-constructs into the combined constructs, but particularly in the target section of the OpenMP spec there are a huge number of combinations of combined constructs and duplicating all this code seems unwieldy. In addition, if a future version of the OpenMP spec adds for example a new allowed clause for the do directive, currently we will need to update the allowed clauses for do not only in do itself but in every combined construct in which do appears (of which there are a large number). 

As such, I propose we restructure the OpenMP semantics checks to include a table of constructs and which clauses are allowed for each, so that this can be indexed not only for each construct itself but also the combined constructs of which it is a member. This will require rewriting most of the semantics checks for OpenMP constructs to use this mechanism, but I think the benefits outweigh the costs of doing this.

Does anyone have any input on this?

Thanks
David Truby


More information about the flang-dev mailing list