This patch adds support for taskwait and taskyield operations in OpenMP dialect and translation of the these constructs to LLVM IR. The OpenMP IRBuilder is used for this translation.
The patch includes code changes and a testcase modifications.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp | ||
---|---|---|
310–311 | There might be more than one LLVM IR operation corresponding to an OpenMP MLIR operation. Would the following be better? | |
mlir/test/Target/openmp-llvm.mlir | ||
4–7 | Should we move all these checks closer to the operation? What is the MLIR/LLVM style for this? |
mlir/test/Target/openmp-llvm.mlir | ||
---|---|---|
4–7 | They can be moved closer to operations https://llvm.org/docs/CommandGuide/FileCheck.html, it's also better for better readibility and cleanly extending test case further in future. |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
75 | Did you mean, this declarative syntax is too short here. Could you please elaborate a bit on this? | |
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp | ||
310–311 | But this function will be called for single OpenMP MLIR operation. | |
331 | I was not aware of TypeSwitch feature. Thanks for the suggestion Mehdi. I will modify as you suggested. | |
mlir/test/Target/openmp-llvm.mlir | ||
4–7 | Thanks for the review Kiran. |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
75 | Sorry I was terse, I meant to use a different mechanism here possibly, look the section about « Declarative Assembly Format» here : https://mlir.llvm.org/docs/OpDefinitions/ |
Hi Mehdi, Thanks for the review. I do not have commit access. Could you please merge this code on my behalf.?
The declarative assembly syntax may be shorter here :)