[PATCH] D78864: [MLIR] Add getBody() method to SingleImplicitBlockTerminator op trait.

Alexander Belyaev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 25 09:00:43 PDT 2020


pifon2a created this revision.
pifon2a added a reviewer: herhut.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini.
Herald added a reviewer: nicolasvasilache.
Herald added a reviewer: rriddle.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
pifon2a edited reviewers, added: mehdi_amini; removed: nicolasvasilache.
Herald added a reviewer: nicolasvasilache.
pifon2a removed a reviewer: nicolasvasilache.
Herald added a reviewer: nicolasvasilache.

Many ops with this trait have `getBody()` and `getBodyBuilder()` methods defined in `extraClassDeclaration` in tablegen. `getBody()` implementation is the same accross all these ops, but `getBodyBuilder()` can return builders with varying insertion points set. In this PR, `getBody()` is moved into `SingleImplicitBlockTerminator` struct and `getBodyBuilder()` is replaced with `OpBuilder::atBlock(End|Terminator)(op.getBody);`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78864

Files:
  flang/include/flang/Optimizer/Dialect/FIROps.td
  mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
  mlir/include/mlir/Dialect/LoopOps/LoopOps.td
  mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
  mlir/include/mlir/IR/Builders.h
  mlir/include/mlir/IR/OpDefinition.h
  mlir/lib/Transforms/Utils/LoopUtils.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78864.260107.patch
Type: text/x-patch
Size: 7461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200425/2224309f/attachment.bin>


More information about the llvm-commits mailing list