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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 10:12:13 PDT 2020


jdoerfert added a comment.

In D86071#2265964 <https://reviews.llvm.org/D86071#2265964>, @ftynse wrote:

>> What exactly do you expect to do with OpenMP worksharing loops on this level which is problematic with CFGs?
>
> It's the inverse that is problematic: having loop ops where CFG is expected. I would like to avoid seeing something like
>
>   omp.do <...> {
>     omp.for %i = <...> {
>       llvm.store <...>
>       // other LLVM operations here
>     }
>   }
>   // LLVM operations as CFG here
>
> go into `mlir-translate`, which will have to outline and lower the loop during _translation_ in this case.

I think I might simply misunderstand because I'm oblivious to the "MLIR way" but the loop belongs to the OpenMP directive.
It has to be the OpenMPIRBuilder that lowers it into a CFG (eventually) because it is not "a fortran/mlir/affine/... loop" but an OpenMP worksharing loop with all what that entails.


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