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

Kiran Chandramohan llvmlistbot at llvm.org
Wed Nov 1 08:36:20 PDT 2023


kiranchandramohan wrote:

Since distribute is always specified on a loop, it might be good to retain that relation in the IR. You could do the following. Here the `omp.canonical_loop` is either the loop to which the distribute construct is applied in the source or could be one that is generated after a loop transformation construct.

!$omp distribute
```
omp.distribute {
  omp.canonical_loop {
  }
}
```
!$omp distribute simd
```
omp.distribute {simd} {
  omp.canonical_loop {
  }
}
```
!$omp distribute parallel do

```
omp.distribute {parallel do} {
  omp.canonical_loop {
  }
}
```
!$omp distribute parallel do simd
```
omp.distribute {parallel do simd} {
  omp.canonical_loop {
  }
}
```

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


More information about the Mlir-commits mailing list