[flang-commits] [flang] [mlir] [mlir][OpenMP] - Transform target offloading directives for easier translation to LLVMIR (PR #83966)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Tue Mar 5 03:25:26 PST 2024


skatrak wrote:

Is there anything preventing this from being done as part of PFT to MLIR lowering rather than a pass? It should be possible to make the `ClauseProcessor::processDepend` method create the outer `omp.task` with the corresponding DEPEND clause, and then have a simpler `ClauseProcessor::processTaskDepend` for the case when it's already attached to the TASK construct (so no new `omp.task` is created then). `omp.target*` ops wouldn't need any DEPEND-related arguments at that point.

In my opinion, that would be less expensive than adding a full pass, and in principle it shouldn't create any big compromises that I can think of. Do you agree with that? I don't mind this approach either, if it's generally preferred by others.

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


More information about the flang-commits mailing list