This patch adds semantic checks for atomic capture construct.
Depends on D127620
Paths
| Differential D126612
[flang][OpenMP] Added semantic checks for atomic capture construct Changes PlannedPublic Authored by NimishMishra on May 29 2022, 4:46 AM.
Details Summary This patch adds semantic checks for atomic capture construct. Depends on D127620
Diff Detail
Event TimelineNimishMishra added reviewers: shraiysh, kiranchandramohan, kiranktp, peixin, MatsPetersson.May 29 2022, 5:55 AM Comment ActionsThere are still some semantic checks left. I will cover them in a separate patch Comment Actions Two minor comments at the moment. Will review it later this week.
Comment Actions Can you split this patch? The small patch with single function is easier to review. If there are multiple checks with similar style, you can put them together.
check "write statement is of the form x = expr if atomic construct is write"
check "operator must refer to the intrinsic operator and not to a user-defined operator" Or even split point 2 into three small patches.
Comment Actions
Sure. Working on splitting this patch's contents across multiple smaller patches NimishMishra retitled this revision from [flang][OpenMP] Add OpenMP 5.0 based semantic checks for atomic construct to [flang][OpenMP] Added semantic checks for atomic capture construct. NimishMishra added a parent revision: D127620: [flang][OpenMP] Added semantic checks for atomic capture, write, and update statements.
Comment Actions The design of this solution could be improved. Following whatever reviews come in https://reviews.llvm.org/D127272, we can use the same basic structural checks from that patch here to understand what the statements 1 and 2 of the atomic capture construct actually are (among read/write/update statements). That would remove dependence on global boolean flags, which don't look good design wise.
Revision Contents
Diff 432780 flang/lib/Semantics/check-omp-structure.h
flang/lib/Semantics/check-omp-structure.cpp
flang/test/Semantics/omp-atomic-assignment-stmt.f90
flang/test/Semantics/omp-atomic-hint-clause.f90
flang/test/Semantics/omp-atomic-user-defined-operators.f90
flang/test/Semantics/omp-atomic02.f90
flang/test/Semantics/omp-atomic04.f90
|
Can we please start adding some documentation to the function right above it, like here