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

Sergio Afonso via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 03:09:27 PDT 2024


skatrak wrote:

> > 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.

I agree with you. It seems like the IF clause should be allowed once in all 3 cases: `target`, `target loop` and `target teams loop`. If `target teams loop` didn't do this already it seems like it's a bug because, as you pointed out, we can't have multiple IF clauses for the same construct, and in that combined construct only one of the leaves (`target`) can accept the clause.

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


More information about the llvm-commits mailing list