[Mlir-commits] [mlir] [OpenMP Dialect] Add omp.canonical_loop operation. (PR #65380)

Jan Leyonberg llvmlistbot at llvm.org
Mon Sep 11 08:33:31 PDT 2023


jsjodin wrote:

> > My concern is that there is an implicit loop that is not visible, any kind of mem2reg type of transform could potentially be wrong.
> > Regarding the implicit nature of the loop, this is no different from the existing OpenMP worksharing loop operation. We probably have to add the `LoopLikeInterface`.  But my understanding is that in general, side-effecting operations are not moved into or outside a region.
> 
> When a mem2reg transformation happens, the loop-carried values will be propagated and the initial value will be an operand of the loop (this is modelled as `initArg` for `scf.for` and `iterArg` for the `fir.do_loop`).
> 
> I think it might be good to move this particular discussion as a question to MLIR discourse, so we can get some input from the experts as well.

I'm waiting to see what happens with the CSE discussions. I think it will be fine to use/add/extend interfaces to capture what is going on as long as the interfaces capture the semantics, and we don't use existing interfaces that just happen to have the effect that we want.

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


More information about the Mlir-commits mailing list