This patch adds support for flush operation in OpenMP dialect and translation of this construct to LLVM IR.
The OpenMP IRBuilder is used for this translation.
The patch includes code changes and testcase modifications.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp | ||
---|---|---|
322 | Is this a TODO? | |
mlir/test/Target/openmp-llvm.mlir | ||
4 | Shall we have more functions to test? Maybe one for those with arguments and one for those without? Also, rename this function. | |
20 | Is it possible to check that the arguments are also passed correctly for this version of omp.flush? |
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp | ||
---|---|---|
320 | I will remove the Fortran syntax | |
321 | This function is specific to openmp Op convertion and also this comment is very generic to flush construct (both C/Fortran). So I placed it here. | |
322 | Openmp runtime will discard the list even if its passed. This is the same behavior with clang and legacy flang as well. The list will be discarded for flush construct. | |
mlir/test/Target/openmp-llvm.mlir | ||
4 | I will add a separate function with arguments and give a meaning full name. |
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp | ||
---|---|---|
321 | I have added the comment around flush construct handling. | |
mlir/test/Dialect/OpenMP/ops.mlir | ||
27 | I have updated the test case to validate the operands as well. | |
28 | The current changes looks fine? | |
mlir/test/Target/openmp-llvm.mlir | ||
20 | Anyway the argument list is being discarded, we need not check for correctness of the arguments. |
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp | ||
---|---|---|
339 | Please comply with the linter (run git clang-format on your patch) |
Let's not use Fortran syntax in C++ code