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

Kiran Chandramohan llvmlistbot at llvm.org
Sun Feb 25 15:24:50 PST 2024


kiranchandramohan wrote:

> @kiranchandramohan I might have misunderstood what you mean, but the problem is not really related to when the callback is called, it is purely on the MLIR level. The callback will not be called unless an input is detected by the `CodeExtractor`. No input will be detected by the `CodeExtractor` if the value does not cross into the parallel op's region. Hence the need for the mapping I did on the MLIR level.

Isn't the CodeExtractor is used for outlining? 

What I was saying was that an alternative way to implement the call back would be to invoke the callback before outlining and without calling it per input. MLIR already carries enough information about the variable/value that is privatized. It only needs materialization of the alloca. So the call back when invoked can go through the privatization operands, create allocas for them and just replace the privatized value with the alloc'ed value.

Note: This is just for info and not requesting a change here.

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


More information about the Mlir-commits mailing list