[Mlir-commits] [mlir] [MLIR][OpenMP] Add omp.loop_nest operation (PR #87083)

Kiran Chandramohan llvmlistbot at llvm.org
Wed Apr 10 04:24:00 PDT 2024


kiranchandramohan wrote:

> > What is the mechanism we now have to avoid code appearing between loop_nest and the wrapper operation?
> 
> The `LoopWrapperInterface` (in the follow-up PR: #87232) defines an `isWrapper()` method that checks that the operation region only contains a single block with a single wrapper or `omp.loop_nest` and a terminator. Then, the wrapper op's verifier can be updated to make sure this is the case (e.g. [#87239](https://github.com/llvm/llvm-project/pull/87239/files#diff-a897370ad8f5ad37e8c1adb3c145c2304aaa38da3227bc1d02ac701ee8dc0754), [#87253](https://github.com/llvm/llvm-project/pull/87253/files#diff-a897370ad8f5ad37e8c1adb3c145c2304aaa38da3227bc1d02ac701ee8dc0754), [#87365](https://github.com/llvm/llvm-project/pull/87365/files#diff-a897370ad8f5ad37e8c1adb3c145c2304aaa38da3227bc1d02ac701ee8dc0754)).

Would the code motion passes still end up moving the operation and then subsequently the verifier errors out?  Have you tried out a code sinking or hoisting pass to see what is the behaviour?

For omp.wsloop where will collapse be represented? In the loop_nest operation?

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


More information about the Mlir-commits mailing list