[Mlir-commits] [mlir] [MLIR][OpenMP]Adding MLIR Op definition for scan (PR #107925)
Sergio Afonso
llvmlistbot at llvm.org
Fri Sep 13 04:59:20 PDT 2024
https://github.com/skatrak commented:
Thank you Anchu for this work. I have some nits, but this generally looks good. However, I think that the new operation would need a verifier.
A good start could be to check that values in a scan directive appear on a parent reduction with an `inscan` modifier and that there is a single omp.scan applied to that construct, but `inscan` is not currently supported. Maybe the check could be to check that values passed to `inclusive` and `exclusive` are block arguments attached to a `reduction` and that the operation defining that reduction only holds a single `omp.scan`, adding a TODO comment to check the `inscan` modifier when supported. Then, update the test in ops.mlir and add a couple to invalid.mlir to exercise these verifier checks. Let me know what you think about this.
When rebasing, notice you no longer need to add definitions to OpenMPClauseOperands.h. Also, the new clauses don't have to pass an `isRequired` template argument to `OpenMP_Clause` (instead, rename `assemblyFormat` to `{req,opt}AssemblyFormat` as needed).
https://github.com/llvm/llvm-project/pull/107925
More information about the Mlir-commits
mailing list