[flang-commits] [flang] [llvm] Adding parsing support for omp loop, target loop directives (PR #93517)

Anchu Rajendran Sudhakumari via flang-commits flang-commits at lists.llvm.org
Tue Jun 4 23:38:36 PDT 2024


anchur wrote:

> > Yes, `target loop` is non-conforming. But some vendor implementations support it and it will be coming with OpenMP 6.0. So, we should accept it. If people like, we may want to emit a warning it a non-conforming feature is being used and is being mapped to `target teams loop`.
> 
> @anchuraj sorry for the late review, yesterday was a public holiday.
> 
> I was more concerned about the list of allowed clauses and allowed once clauses. There are small differences between the 2 lists for target teams loop and target loop (for example `if` is in `allowedClauses` for `target teams loop` while in `allowedOnceClauses` for `target loop`). Maybe we just copy and paste the list from `target teams loop` or share them somehow.

This part is confusing for me as well. For `target` construct it is specified in allowed once clause. I think it makes more sense to include it in allowed once as semantics of multiple if conditions included in a construct may be ambiguous. The following is from standard. I followed the same structure as specified in `target` and `loop` directives
```
Restrictions
20 Restrictions to the if clause are as follows:
21  At most one if clause can be specified that applies to the semantics of any construct or
22 constituent construct of a directive-specification.
```

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


More information about the flang-commits mailing list