[Mlir-commits] [mlir] [OpenMP][MLIR] Add omp.distribute op to the OMP dialect (PR #67720)

Jan Leyonberg llvmlistbot at llvm.org
Wed Oct 4 06:06:14 PDT 2023


jsjodin wrote:

> > The issue here is that `omp.parallel` can potentially be outlined into a function and it is a legal transformation. But if this transformation is performed, then the unroll of the inner loop is lost and existing data dependence will not prevent that.
> 
> If the outlining is done then %cli2 would become a parameter to the outlined function, so the the outlining wouldn't be lost. but it would require an interprocedural view. How would this work with the original proposal? Would the CLI's be returned from the outlined function?

This also raises questions about possible loop transformations that involve multiple loops. How would e.g. loop interchange work in the presence of parallel like the example above? If outlining happens the interchange would be very difficult to achieve. It seems reasonable to do the transforms early and eliminate those ops before any other transformations take place, The transforms specified in the source code refer to the initial structure of the code and not the structure that may come about after doing a bunch of transforms like outlining.

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


More information about the Mlir-commits mailing list