llvm-project/mlir/tools
Alex Zinenko 2996a8d675 [mlir] avoid exposing mutable DialectRegistry from MLIRContext
MLIRContext allows its users to access directly to the DialectRegistry it
contains. While sometimes useful for registering additional dialects on an
already existing context, this breaks the encapsulation by essentially giving
raw accesses to a part of the context's internal state. Remove this mutable
access and instead provide a method to append a given DialectRegistry to the
one already contained in the context. Also provide a shortcut mechanism to
construct a context from an already existing registry, which seems to be a
common use case in the wild. Keep read-only access to the registry contained in
the context in case it needs to be copied or used for constructing another
context.

With this change, DialectRegistry is no longer concerned with loading the
dialects and deciding whether to invoke delayed interface registration. Loading
is concentrated in the MLIRContext, and the functionality of the registry
better reflects its name.

Depends On D96137

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D96331
2021-02-10 12:07:34 +01:00
..
mlir-cpu-runner [mlir] Make mlir-cpu-runner depend on native instead of X86 2020-11-30 15:11:34 +00:00
mlir-cuda-runner [mlir] Add gpu async integration test. 2021-02-03 21:45:23 +01:00
mlir-linalg-ods-gen [mlir][linalg] Verify indexing map required attributes 2021-02-09 08:48:29 -05:00
mlir-opt [mlir] Add initial support for an alias analysis framework in MLIR 2021-02-09 14:21:27 -08:00
mlir-reduce [mlir] avoid exposing mutable DialectRegistry from MLIRContext 2021-02-10 12:07:34 +01:00
mlir-rocm-runner Set GPU context before {cu,hip}MemHostRegister. 2021-02-03 20:00:36 +01:00
mlir-shlib [MLIR] Reapply: Adjust libMLIR building to more closely follow libClang 2020-05-04 20:47:57 -07:00
mlir-spirv-cpu-runner [mlir][spirv] NFC: rename SPIR-V conversion files for consistency 2020-12-23 14:36:46 -05:00
mlir-tblgen Fix side-effect detection in LLVMIRIntrinsicGen. 2021-02-10 00:48:16 +00:00
mlir-translate Revert "[RFC] Factor out repetitive cmake patterns for llvm-style projects" 2020-10-04 15:17:34 -07:00
mlir-vulkan-runner [mlir] Mark LogicalResult as LLVM_NODISCARD 2021-02-04 15:10:10 -08:00
CMakeLists.txt [mlir] Fix cross-compilation (Linalg ODS gen) 2021-01-18 11:57:55 +01:00