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

Kiran Chandramohan llvmlistbot at llvm.org
Wed Apr 10 09:19:54 PDT 2024


kiranchandramohan wrote:

I have seen canonicalize transformation pull constants outside of OpenMP constructs. 
```
func.func @constant_sink_test(%x : !llvm.ptr) {
  omp.parallel {
    %c1 = arith.constant 10 : i32
    llvm.store %c1, %x : i32, !llvm.ptr
    omp.terminator
  }
  return
}
```

./bin/mlir-opt --canonicalize t1.mlir 
```
module {
  func.func @constant_sink_test(%arg0: !llvm.ptr) {
    %c10_i32 = arith.constant 10 : i32
    omp.parallel {
      llvm.store %c10_i32, %arg0 : i32, !llvm.ptr
      omp.terminator
    }
    return
  }
}
```

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


More information about the Mlir-commits mailing list