[Mlir-commits] [mlir] [OpenMP Dialect] Add omp.canonical_loop operation. (PR #65380)
Jan Leyonberg
llvmlistbot at llvm.org
Fri Sep 8 07:30:38 PDT 2023
jsjodin wrote:
> Thanks @jsjodin, I thought about this and mentioned a comment on the `omp.structured_region` RFC here - https://discourse.llvm.org/t/rfc-openmp-adding-omp-structured-region/73228/3
>
> Specifically, this point -
>
> * All the transforms for an `omp.canonical_loop` must be declared before another `omp.structured_region` or any other operation.
>
> I think this check would be required as a part of the verifier.
If an optimization makes a change that violates the invariant will the compiler assert?
I also had another question. Is legal OpenMP?
```
int x = 5;
#pragma omp unroll full
for (i = 0; i < 10; i++) {
x = x + 1;
}
return x;
```
Would this be represented as a canonical loop, and what would the MLIR for it look like?
https://github.com/llvm/llvm-project/pull/65380
More information about the Mlir-commits
mailing list