This is an archive of the discontinued LLVM Phabricator instance.

[Flang][OpenMP][Sema] Add semantics checks for REQUIRES directive
ClosedPublic

Authored by skatrak on Aug 11 2023, 8:02 AM.

Details

Summary

This patch adds semantics checks for REQUIRES directives appearing after other directives that are affected by them. In particular, it adds checks for device constructs appearing after device-related REQUIRES directives and for the atomic_default_mem_order clause appearing after atomic operations where the memory order is not explicitly specified.

This is patch 2/5 of a series splitting D149337 to simplify review.

Depends on D157710.

Diff Detail

Event Timeline

skatrak created this revision.Aug 11 2023, 8:02 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
skatrak requested review of this revision.Aug 11 2023, 8:02 AM

LG.

flang/lib/Semantics/check-omp-structure.cpp
403

Nit: Add a comment here that this for combined constructs having target and loop.

801

Nit: Add a comment here on why this is required.

1210–1211

Nit: Not related to this patch, but for ease of recollection, add a comment saying that there are two forms of declare target (one with clauses and the other without).

3032–3033
3040
This revision is now accepted and ready to land.Aug 14 2023, 4:39 AM
skatrak updated this revision to Diff 550256.Aug 15 2023, 4:36 AM
skatrak marked 5 inline comments as done.

Address nit comments and update unit tests.

This revision was landed with ongoing or failed builds.Aug 15 2023, 4:38 AM
This revision was automatically updated to reflect the committed changes.