[PATCH] D79688: [mlir] loop::ForOp: provide builders with callbacks for loop body
Alex Zinenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 10 05:51:01 PDT 2020
ftynse created this revision.
ftynse added reviewers: nicolasvasilache, pifon2a, herhut, rriddle, mehdi_amini.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, stephenneuendorffer, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, csigg, antiagainst, shauheen, jpienaar.
Herald added a reviewer: aartbik.
Herald added a project: LLVM.
Thanks to a recent change that made `::build` functions take an instance of
`OpBuilder`, it is now possible to build operations within a region attached to
the operaiton about to be created. Exercise this on `loop::ForOp` by taking a
callback that populates the loop body while the loop is being created.
Additionally, provide helper functions to build perfect nests of `ForOp`s,
with support for iteration arguments. These functions provide the same
functionality as EDSC LoopNestBuilder with simpler implementation, without
relying on edsc::ScopedContext, and using `OpBuilder` in an unambiguous way.
Compatibility functions for EDSC are provided, but may be removed in the
future.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D79688
Files:
mlir/include/mlir/Dialect/LoopOps/EDSC/Builders.h
mlir/include/mlir/Dialect/LoopOps/LoopOps.h
mlir/include/mlir/Dialect/LoopOps/LoopOps.td
mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp
mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp
mlir/lib/Dialect/LoopOps/EDSC/Builders.cpp
mlir/lib/Dialect/LoopOps/LoopOps.cpp
mlir/test/EDSC/builder-api-test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79688.263069.patch
Type: text/x-patch
Size: 16604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200510/ac8bd71c/attachment.bin>
More information about the llvm-commits
mailing list