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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/CAPI/Registration.h | ||
---|---|---|
35 | We can probably remove this and implement the C function in terms of dialectregistry |
mlir/include/mlir/CAPI/Registration.h | ||
---|---|---|
35 | Agreed. I believe this is used in a number of downstreams. Can you document the recommended change in the commit description and note that we will remove this soon. Add a todo here. |
mlir/include/mlir/CAPI/Registration.h | ||
---|---|---|
35 | I’m pro deprecation, but I was merely referring to the function pointer. We can keep the C API and just call the registry version from the implementation. So we could remove this and add a note. |
Added TODO regarding removing MlirContextRegisterDialectHook and updated
commit message.
mlir/include/mlir/CAPI/Registration.h | ||
---|---|---|
35 | Oh, I interpreted this as people were directly using the function pointer. I can get rid of it if that isn't the case. |
Remove MlirContextRegisterDialectHook and implement
mlirDialectHandleRegisterDialect using mlirDialectHandleInsertDialect
mlir/include/mlir/CAPI/Registration.h | ||
---|---|---|
35 | Updated to remove the function pointer and implement mlirDialectHandleRegisterDialect using mlirDialectHandleInsertDialect. |
mlir/include/mlir-c/Registration.h | ||
---|---|---|
54 | Do we need to deprecate this API? Seems like it can stay as a convenient wrapper? |
mlir/include/mlir-c/Registration.h | ||
---|---|---|
54 | That's true, I can just leave the declaration as is for now |
Do we need to deprecate this API? Seems like it can stay as a convenient wrapper?