[Mlir-commits] [mlir] [MLIR][OpenMP] Support basic materialization for `omp.private` ops (PR #81715)

Kareem Ergawy llvmlistbot at llvm.org
Thu Feb 22 05:01:27 PST 2024


ergawy wrote:

> It is unfortunate we have to clone the operation. This might be costly if there are many parallel operations. Ideally the OpenMPIRBuilder should be modified to make this work.
> 
> It is alrite as a solution for now. Please wait a day incase @jdoerfert has comments.

We don't have to clone if the op is disposable at this point. At some point, I directly re-mapped the region arguments to the original SSA values they privatize and things were working fine.

If needed, I can go back to doing that and then undoing this remapping after the conversion. This way the op is not cloned and at the same time is restored to its original state after lowering.

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


More information about the Mlir-commits mailing list