[PATCH] D86071: [MLIR][OpenMP] Add omp.do operation

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 23:54:31 PDT 2020


bondhugula added a comment.

In D86071#2273026 <https://reviews.llvm.org/D86071#2273026>, @jdoerfert wrote:

> 



>> The remaining scf.for's would be lowered to LLVM dialect the usual way. It looks like we need some sort of a pre-pass on the LLVM dialect to lower/handle the `omp.do` and some of the implementation therein would have to duplicate/reuse the logic of `scf.for` lowering.
>
> I don't see why this would be the case. As mentioned above, the loop, whatever "op" it might be, belongs to the `omp do`. There is no `omp do` without loop, there is no "loop" once `omp do` has been lowered (to runtime calls). The `omp do` lowering is also not duplicating `scf.for` code if you use the OpenMPIRBuilder.

I see. So you are suggesting just preserving the `omp.do` all the way into the LLVM dialect and then use the `OpenMPIRBuilder` in the MLIR LLVM dialect to LLVM IR *translator*?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86071



More information about the llvm-commits mailing list