[PATCH] D80138: [mlir] ensureRegionTerminator: take OpBuilder

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 03:19:16 PDT 2020


ftynse marked an inline comment as done.
ftynse added inline comments.
Herald added a project: MLIR.


================
Comment at: mlir/lib/IR/Operation.cpp:1119
+void impl::ensureRegionTerminator(
+    Region &region, Builder &builder, Location loc,
+    function_ref<Operation *(OpBuilder &, Location)> buildTerminatorOp) {
----------------
rriddle wrote:
> Where is this version called from? Can we remove it?
>From `SingleBlockImplicitTerminator::ensureTerminator(Region &, Builder &, Location)` overload, which in turn is called by various parsers. Since parsers don't have an `OpBuilder`, we need to construct it somewhere. If we want to remove this, we need to either give parsers an OpBuilder, or require them to construct one before calling `ensureTerminator.`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80138





More information about the llvm-commits mailing list