[PATCH] D75649: [mlir] Introduce OwningFuncRef following the same pattern as OwningModuleRef
Tamas Berghammer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 15:11:33 PST 2020
tberghammer created this revision.
tberghammer added a reviewer: rriddle.
Herald added subscribers: Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, mehdi_amini.
Herald added 1 blocking reviewer(s): rriddle.
Herald added a project: LLVM.
Between the creating of a function op and adding it to a module it has no
explicit owner what can lead to memory leaks. The new class is intended to be
used as a convenient RAII owner for that time.
This change generalizes the code for OwningModuleRef to support arbitrary Op
types and makes OwningModuleRef and OwningFuncRef a simple shim around the
generic class to still enable forward declaring these types.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75649
Files:
mlir/include/mlir/IR/Function.h
mlir/include/mlir/IR/Module.h
mlir/include/mlir/IR/OwningOpRef.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75649.248330.patch
Type: text/x-patch
Size: 3883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200304/6e6b9c96/attachment-0001.bin>
More information about the llvm-commits
mailing list