[PATCH] D135695: [OMPIRBuilder] Support depend clause for task construct

Prabhdeep Soni via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 08:16:27 PDT 2022


psoni2628 added inline comments.


================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMPConstants.h:210
 
+enum class OMPRTLDependenceKindTy {
+  OMPDepIn = 0x01,
----------------
domada wrote:
> Do we need definition of `OMPRTLDependenceKindTy ` and `OpenMPDependKind `? It looks like these two class enums are overlapping.
`OMPRTLDependenceKindTy` is to be used with the `OMPRTL___kmpc_omp_task_with_deps` runtime function to encode what kind of dependency a given clause is, whereas `OpenMPDependKind` is for the MLIR to encode what kind of dependency a given clause is. You could map them to the same thing, but IMO, it is better to keep them separate. `llvm::OpenMPIRBuilder::OpenMPDependKind::OMP_DEPEND_out` and `llvm::OpenMPIRBuilder::OpenMPDependKind::OMP_DEPEND_inout` happen to map to the same thing, `OMPRTLDependenceKindTy::OMPDepInOut`, which is what the `translateDependencyKind` function does, but I don't think it makes much sense to map them to the same thing at the MLIR level. IMO, they should be kept distinct.


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

https://reviews.llvm.org/D135695



More information about the llvm-commits mailing list