[PATCH] D79688: [mlir] loop::ForOp: provide builders with callbacks for loop body

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 10 11:10:31 PDT 2020


mehdi_amini accepted this revision.
mehdi_amini added a comment.
This revision is now accepted and ready to land.

Typo in the commit description: `operaiton` -> `operation`



================
Comment at: mlir/lib/Dialect/LoopOps/LoopOps.cpp:56
+
+  if (iterArgs.empty() && !bodyBuilder) {
+    ForOp::ensureTerminator(*bodyRegion, builder, result.location);
----------------
Can you document the condition?

I assume it is something like "if there are `iterArgs` provided, we don't create a default terminator as it must take the same argument types."


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79688





More information about the llvm-commits mailing list