[flang-commits] [flang] [llvm] [Frontend][OpenMP] Follow compound construct clause restrictions (PR #107853)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Fri Sep 13 07:11:50 PDT 2024


skatrak wrote:

I see, I imagined your concern could be related to the future auto-generated OMP.td. The problem is that the current approach is actually not having frontend-specific checks for this specifically, but rather omitting clauses from the `allowedClauses` property. As reference, see these cases prior to this PR:
- No `OMPC_Copyin` because of the `target` leaf: `OMP_TargetParallel`, `OMP_TargetParallelDoSimd`, `OMP_TargetParallelFor`, `OMP_TargetParallelForSimd`, `OMP_TargetTeamsDistributeParallelFor`, `OMP_TargetTeamsDistributeParallelForSimd`.
- No `OMPC_Ordered` because of the `distribute` leaf: `OMP_DistributeParallelDoSimd`, `OMP_DistributeParallelFor`, `OMP_DistributeParallelForSimd`, `OMP_TargetTeamsDistribute`, `OMP_TargetTeamsDistributeParallelFor`, `OMP_TargetTeamsDistributeParallelForSimd`, `OMP_TargetTeamsDistributeSimd`, `OMP_TeamsDistributeParallelDoSimd`, `OMP_TeamsDistributeParallelFor`, `OMP_TeamsDistributeParallelForSimd`, `OMP_TeamsDistributeSimd`.

This PR just completes these checks, since there were fewer exceptions missing than exceptions handled. If these checks need to be migrated to frontend checks because of the limited information available from these JSON files, I'm not against that. I just think that's a separate PR, what do you think?

https://github.com/llvm/llvm-project/pull/107853


More information about the flang-commits mailing list