llvm-project/mlir/unittests
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
..
Analysis [MLIR] Add support for extracting an integer sample point (if one exists) from an unbounded FlatAffineConstraints. 2021-01-22 22:28:38 +05:30
Dialect [mlir] Mark LogicalResult as LLVM_NODISCARD 2021-02-04 15:10:10 -08:00
ExecutionEngine Rework ExecutionEngine::invoke() to make it more friendly to use from C++ 2021-02-06 01:32:50 +00:00
IR [mlir] avoid exposing mutable DialectRegistry from MLIRContext 2021-02-10 12:07:34 +01:00
Pass [flang] Use mlir::OpState::operator->() to get to methods of mlir::Operation. 2020-12-14 20:04:53 +01:00
SDBM Remove global dialect registration 2020-10-24 00:35:55 +00:00
Support [mlir] Add NumberOfExecutions analysis + update RegionBranchOpInterface interface to query number of region invocations 2020-11-11 01:43:17 -08:00
TableGen Revert "Revert "Reorder MLIRContext location in BuiltinAttributes.h"" 2021-02-08 10:39:58 +01:00
CMakeLists.txt Rework ExecutionEngine::invoke() to make it more friendly to use from C++ 2021-02-06 01:32:50 +00:00