summaryrefslogtreecommitdiff
path: root/mlir/lib/CAPI/IR/DialectHandle.cpp
AgeCommit message (Collapse)Author
2022-02-01[mlir][capi] Add DialectRegistry to MLIR C-APIDaniel Resnick
Exposes mlir::DialectRegistry to the C API as MlirDialectRegistry along with helper functions. A hook has been added to MlirDialectHandle that inserts the dialect into a registry. A future possible change is removing mlirDialectHandleRegisterDialect in favor of using mlirDialectHandleInsertDialect, which it is now implemented with. Differential Revision: https://reviews.llvm.org/D118293
2021-02-09[MLIR] Replace dialect registration hooks with dialect handleGeorge
Replace MlirDialectRegistrationHooks with MlirDialectHandle, which under-the-hood is an opaque pointer to MlirDialectRegistrationHooks. Then we expose the functionality previously directly on MlirDialectRegistrationHooks, as functions which take the opaque MlirDialectHandle struct. This makes the actual structure of the registration hooks an implementation detail, and happens to avoid this issue: https://llvm.discourse.group/t/strange-swift-issues-with-dialect-registration-hooks/2759/3 Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D96229