[PATCH] D74708: [MLIR][Ploops] Add custom builders from ParallelOp and ReduceOp.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 09:54:29 PST 2020


rriddle added inline comments.


================
Comment at: mlir/lib/Dialect/LoopOps/LoopOps.cpp:248
+  ParallelOp::ensureTerminator(*bodyRegion, *builder, result.location);
+  for (size_t i = 0; i < steps.size(); ++i)
+    bodyRegion->front().addArgument(builder->getIndexType());
----------------
Please cache the end value of this loop.


================
Comment at: mlir/lib/Dialect/LoopOps/LoopOps.cpp:377
+  Block *b = new Block();
+  b->addArguments(SmallVector<Type, 2>({type, type}));
+  bodyRegion->getBlocks().insert(bodyRegion->end(), b);
----------------
Nit: SmallVector -> ArrayRef?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74708





More information about the llvm-commits mailing list