[PATCH] D80527: [mlir] SCF: provide function_ref builders for IfOp
Alex Zinenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 25 10:10:28 PDT 2020
ftynse created this revision.
ftynse added reviewers: nicolasvasilache, pifon2a.
Herald added subscribers: llvm-commits, jurahul, Kayjukh, frgossen, grosul1, Joonsoo, stephenneuendorffer, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini.
Herald added a reviewer: aartbik.
Herald added a project: LLVM.
Now that OpBuilder is available in `build` functions, it becomes possible to
populate the "then" and "else" regions directly when building the "if"
operation. This is desirable in more structured forms of builders, especially
in when conditionals are mixed with loops. Provide new `build` APIs taking
callbacks for body constructors, similarly to scf::ForOp, and replace more
clunky edsc::BlockBuilder uses with these. The original APIs remain available
and go through the new implementation.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80527
Files:
mlir/include/mlir/Dialect/SCF/EDSC/Builders.h
mlir/include/mlir/Dialect/SCF/SCF.h
mlir/include/mlir/Dialect/SCF/SCFOps.td
mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
mlir/lib/Dialect/SCF/EDSC/Builders.cpp
mlir/lib/Dialect/SCF/SCF.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80527.266045.patch
Type: text/x-patch
Size: 11467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200525/771325dc/attachment-0001.bin>
More information about the llvm-commits
mailing list