[PATCH] D75649: [mlir] Introduce OwningFuncRef following the same pattern as OwningModuleRef
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 23:00:30 PDT 2020
rriddle added a comment.
In D75649#1916222 <https://reviews.llvm.org/D75649#1916222>, @mehdi_amini wrote:
> > using `OpBuilder::create` is much more idiomatic with the rest of the infra.
>
> The builder APIs don't express clear ownership though, having a RAII type would be nice!
> Could the OpBuilder::create always return an OwningOpRef<OpTy> ?
That doesn't really make sense to me, OpBuilder::create generally inserts the operation into a block. I'm not sure what ownership semantics you are assigning to it here. Am I missing something? OpBuilder::create isn't a static method.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75649/new/
https://reviews.llvm.org/D75649
More information about the llvm-commits
mailing list