[PATCH] D108512: [flang][OpenMP] Add semantic checks for ordered construct

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 3 03:34:26 PDT 2021


kiranchandramohan added a comment.

In D108512#2966936 <https://reviews.llvm.org/D108512#2966936>, @peixin wrote:

> This patch is based on D94087 <https://reviews.llvm.org/D94087>.
> @sameeranjoshi I did some changes from your implementation. Please let me know if you think it is not OK.
>
> I assume that the codes for parsing depend clause in `openmp-parsers.cpp` and `parse-tree.h` are not consistent. Is the following fix OK or should we leave it?
>
>   diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
>   index 5ce6a110c1e6..060c8b4a3060 100644
>   --- a/flang/include/flang/Parser/parse-tree.h
>   +++ b/flang/include/flang/Parser/parse-tree.h
>   @@ -3439,9 +3439,9 @@ struct OmpDependSinkVec {
>      std::tuple<Name, std::optional<OmpDependSinkVecLength>> t;
>    };
>   
>   -// 2.13.9 depend-type -> IN | OUT | INOUT | SOURCE | SINK
>   +// 2.13.9 depend-type -> IN | OUT | INOUT
>    struct OmpDependenceType {
>   -  ENUM_CLASS(Type, In, Out, Inout, Source, Sink)
>   +  ENUM_CLASS(Type, In, Out, Inout)
>      WRAPPER_CLASS_BOILERPLATE(OmpDependenceType, Type);
>    };

Please remove SOURCE and SINK if it is not required in OmpDependenceType.

> Regarding to the last comment, I think the iteration of clause lit is necessary since multiple semantic checks may be needed such as `depend(source) depend(sink: undecvar - 1) depend(source)`.

Which comment are you referring to here?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108512/new/

https://reviews.llvm.org/D108512



More information about the llvm-commits mailing list