Add NoSideEffects trait to omp.parallel operation.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
55 | This looks contradictory to have both recursive side effects and no side effects. |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
55 | Hmm, the way I understood this would work is -
That means omp.parallel only has side effects when the operations under it have side effects. I got this understanding from one of River's replies with lambda in https://reviews.llvm.org/D74439. (Phabricator doesn't let me copy link to comment, but its on the file mlir/include/mlir/IR/OpDefinition.h)Please let me know if I have misunderstood something here. |
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td | ||
---|---|---|
55 | I guessed how you wanted to interpret that mix of traits, but I still think it is highly confusing to denote it that way. Note that dropping the trait gives you the same behavior and all your tests still pass. River's comment on that diff needs slight clarification. I suppose it was meant to illustrate the difference between a loop-like operation that would have RecursiveSideEffects and a lambda-like operation that itself would not. |
This looks contradictory to have both recursive side effects and no side effects.