[PATCH] D86071: [MLIR][OpenMP] Add omp.wsloop operation

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 01:29:12 PDT 2020


ftynse added inline comments.


================
Comment at: mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td:103
+
+def WsLoopOp : OpenMP_Op<"wsloop", [AttrSizedOperandSegments]> {
+  let summary = "workshare loop construct";
----------------
clementval wrote:
> Would it make sense to add the `DeclareOpInterfaceMethods<LoopLikeOpInterface>` trait since you added `lowerBound`, `upperBound` and `step`? 
`LoopLikeOpInterface` is a bit of a misnomer. It has nothing to do with bounds, but instead registers the op to be processed by LICM. It will likely break OpenMP loops.


================
Comment at: mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td:152
+
+  let regions = (region AnyRegion:$region);
+}
----------------
How does one terminate such loops?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86071/new/

https://reviews.llvm.org/D86071



More information about the llvm-commits mailing list