|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
0f304ef0 |
| 19-Jan-2022 |
River Riddle <[email protected]> |
[mlir] Add asserts when changing various MLIRContext configurations
This helps to prevent tsan failures when users inadvertantly mutate the context in a non-safe way.
Differential Revision: https:/
[mlir] Add asserts when changing various MLIRContext configurations
This helps to prevent tsan failures when users inadvertantly mutate the context in a non-safe way.
Differential Revision: https://reviews.llvm.org/D112021
show more ...
|
| #
77eee579 |
| 22-Feb-2022 |
River Riddle <[email protected]> |
[mlir] Refactor DialectRegistry delayed interface support into a general DialectExtension mechanism
The current dialect registry allows for attaching delayed interfaces, that are added to attrs/dial
[mlir] Refactor DialectRegistry delayed interface support into a general DialectExtension mechanism
The current dialect registry allows for attaching delayed interfaces, that are added to attrs/dialects/ops/etc. when the owning dialect gets loaded. This is clunky for quite a few reasons, e.g. each interface type has a separate tracking structure, and is also quite limiting. This commit refactors this delayed mutation of dialect constructs into a more general DialectExtension mechanism. This mechanism is essentially a registration callback that is invoked when a set of dialects have been loaded. This allows for attaching interfaces directly on the loaded constructs, and also allows for loading new dependent dialects. The latter of which is extremely useful as it will now enable dependent dialects to only apply in the contexts in which they are necessary. For example, a dialect dependency can now be conditional on if a user actually needs the interface that relies on it.
Differential Revision: https://reviews.llvm.org/D120367
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2 |
|
| #
1fc096af |
| 02-Jan-2022 |
Mehdi Amini <[email protected]> |
Apply clang-tidy fixes for performance-unnecessary-value-param to MLIR (NFC)
Reviewed By: Mogball
Differential Revision: https://reviews.llvm.org/D116250
|
| #
e5639b3f |
| 22-Dec-2021 |
Mehdi Amini <[email protected]> |
Fix more clang-tidy cleanups in mlir/ (NFC)
|
| #
be0a7e9f |
| 07-Dec-2021 |
Mehdi Amini <[email protected]> |
Adjust "end namespace" comment in MLIR to match new agree'd coding style
See D115115 and this mailing list discussion: https://lists.llvm.org/pipermail/llvm-dev/2021-December/154199.html
Differenti
Adjust "end namespace" comment in MLIR to match new agree'd coding style
See D115115 and this mailing list discussion: https://lists.llvm.org/pipermail/llvm-dev/2021-December/154199.html
Differential Revision: https://reviews.llvm.org/D115309
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
195730a6 |
| 16-Nov-2021 |
River Riddle <[email protected]> |
[mlir][NFC] Replace references to Identifier with StringAttr
This is part of the replacement of Identifier with StringAttr.
Differential Revision: https://reviews.llvm.org/D113953
|
| #
53120631 |
| 24-Sep-2021 |
River Riddle <[email protected]> |
[mlir:OpAsm] Factor out the common bits of (Op/Dialect)Asm(Parser/Printer)
This has a few benefits: * It allows for defining parsers/printer code blocks that can be shared between operations and a
[mlir:OpAsm] Factor out the common bits of (Op/Dialect)Asm(Parser/Printer)
This has a few benefits: * It allows for defining parsers/printer code blocks that can be shared between operations and attribute/types. * It removes the weird duplication of generic parser/printer hooks, which means that newly added hooks only require touching one class.
Differential Revision: https://reviews.llvm.org/D110375
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
| #
fd87963e |
| 28-Aug-2021 |
Mehdi Amini <[email protected]> |
Change dialect `printOperation()` hook to `getOperationPrinter()`
This makes the hook return a printer if available, instead of using LogicalResult to indicate if a printer was available (and invok
Change dialect `printOperation()` hook to `getOperationPrinter()`
This makes the hook return a printer if available, instead of using LogicalResult to indicate if a printer was available (and invoked). This allows the caller to detect that the dialect has a printer for a given operation without actually invoking the printer. It'll be leveraged in a future revision to move printing the op name itself under control of the ASMPrinter.
Differential Revision: https://reviews.llvm.org/D108803
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1 |
|
| #
9b50844f |
| 02-Aug-2021 |
Vladislav Vinogradov <[email protected]> |
[mlir] Fix delayed object interfaces registration
Store both interfaceID and objectID as key for interface registration callback. Otherwise the implementation allows to register only one external mo
[mlir] Fix delayed object interfaces registration
Store both interfaceID and objectID as key for interface registration callback. Otherwise the implementation allows to register only one external model per one object in the single dialect.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D107274
show more ...
|
| #
f8479d9d |
| 28-Jul-2021 |
River Riddle <[email protected]> |
[mlir] Set the namespace of the BuiltinDialect to 'builtin'
Historically the builtin dialect has had an empty namespace. This has unfortunately created a very awkward situation, where many utilities
[mlir] Set the namespace of the BuiltinDialect to 'builtin'
Historically the builtin dialect has had an empty namespace. This has unfortunately created a very awkward situation, where many utilities either have to special case the empty namespace, or just don't work at all right now. This revision adds a namespace to the builtin dialect, and starts to cleanup some of the utilities to no longer handle empty namespaces. For now, the assembly form of builtin operations does not require the `builtin.` prefix. (This should likely be re-evaluated though)
Differential Revision: https://reviews.llvm.org/D105149
show more ...
|
|
Revision tags: llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
| #
d7e89121 |
| 16-Jun-2021 |
Alex Zinenko <[email protected]> |
[mlir] Enable delayed registration of attribute/operation/type interfaces
This functionality is similar to delayed registration of dialect interfaces. It allows external interface models to be regis
[mlir] Enable delayed registration of attribute/operation/type interfaces
This functionality is similar to delayed registration of dialect interfaces. It allows external interface models to be registered before the dialect containing the attribute/operation/type interface is loaded, or even before the context is created.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D104397
show more ...
|
|
Revision tags: llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
| #
a0c776fc |
| 23-Mar-2021 |
Mehdi Amini <[email protected]> |
Add a mechanism for Dialects to customize printing/parsing operations when they are unregistered
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D99007
|
|
Revision tags: llvmorg-12.0.0-rc3 |
|
| #
e6260ad0 |
| 27-Feb-2021 |
River Riddle <[email protected]> |
[mlir] Simplify various pieces of code now that Identifier has access to the Context/Dialect
This also exposed a bug in Dialect loading where it was not correctly identifying identifiers that had th
[mlir] Simplify various pieces of code now that Identifier has access to the Context/Dialect
This also exposed a bug in Dialect loading where it was not correctly identifying identifiers that had the dialect namespace as a prefix.
Differential Revision: https://reviews.llvm.org/D97431
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc2 |
|
| #
34ea608a |
| 15-Feb-2021 |
Alex Zinenko <[email protected]> |
[mlir] Support repeated delayed registration of dialect interfaces
Dialects themselves do not support repeated addition of interfaces with the same TypeID. However, in case of delayed registration,
[mlir] Support repeated delayed registration of dialect interfaces
Dialects themselves do not support repeated addition of interfaces with the same TypeID. However, in case of delayed registration, the registry may contain such an interface, or have the same interface registered several times due to, e.g., dependencies. Make sure we delayed registration does not attempt to add an interface with the same TypeID more than once.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D96606
show more ...
|
| #
2996a8d6 |
| 10-Feb-2021 |
Alex Zinenko <[email protected]> |
[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 d
[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
show more ...
|
| #
3da51522 |
| 10-Feb-2021 |
Alex Zinenko <[email protected]> |
[mlir] enable delayed registration of dialect interfaces
This introduces a mechanism to register interfaces for a dialect without making the dialect itself depend on the interface. The registration
[mlir] enable delayed registration of dialect interfaces
This introduces a mechanism to register interfaces for a dialect without making the dialect itself depend on the interface. The registration request happens on DialectRegistry and, if the dialect has not been loaded yet, the actual registration is delayed until the dialect is loaded. It requires DialectRegistry to become aware of the context that contains it and the context to expose methods for querying if a dialect is loaded.
This mechanism will enable a simple extension mechanism for dialects that can have interfaces defined outside of the dialect code. It is particularly helpful for, e.g., translation to LLVM IR where we don't want the dialect itself to depend on LLVM IR libraries.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D96137
show more ...
|
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
| #
1b97cdf8 |
| 17-Dec-2020 |
River Riddle <[email protected]> |
[mlir][IR][NFC] Move context/location parameters of builtin Type::get methods to the start of the parameter list
This better matches the rest of the infrastructure, is much simpler, and makes it eas
[mlir][IR][NFC] Move context/location parameters of builtin Type::get methods to the start of the parameter list
This better matches the rest of the infrastructure, is much simpler, and makes it easier to move these types to being declaratively specified.
Differential Revision: https://reviews.llvm.org/D93432
show more ...
|
|
Revision tags: llvmorg-11.0.1-rc1 |
|
| #
e7021232 |
| 23-Oct-2020 |
Mehdi Amini <[email protected]> |
Remove global dialect registration
This has been deprecated for >1month now and removal was announced in:
https://llvm.discourse.group/t/rfc-revamp-dialect-registration/1559/11
Differential Revisi
Remove global dialect registration
This has been deprecated for >1month now and removal was announced in:
https://llvm.discourse.group/t/rfc-revamp-dialect-registration/1559/11
Differential Revision: https://reviews.llvm.org/D86356
show more ...
|
| #
6a726358 |
| 23-Oct-2020 |
Mehdi Amini <[email protected]> |
Revert "Remove global dialect registration"
This reverts commit b22e2e4c6e420b78a8a4c307f0cf002f51af9590.
Investigating broken builds
|
| #
b22e2e4c |
| 23-Oct-2020 |
Mehdi Amini <[email protected]> |
Remove global dialect registration
This has been deprecated for >1month now and removal was announced in:
https://llvm.discourse.group/t/rfc-revamp-dialect-registration/1559/11
Differential Revisi
Remove global dialect registration
This has been deprecated for >1month now and removal was announced in:
https://llvm.discourse.group/t/rfc-revamp-dialect-registration/1559/11
Differential Revision: https://reviews.llvm.org/D86356
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
| #
f5491408 |
| 31-Aug-2020 |
Mehdi Amini <[email protected]> |
Fix mlir-reduce to explicitly register dialects and disable the global dialect registry by default
Clients who rely on the Context loading dialects from the global registry can call `mlir::enableGlo
Fix mlir-reduce to explicitly register dialects and disable the global dialect registry by default
Clients who rely on the Context loading dialects from the global registry can call `mlir::enableGlobalDialectRegistry(true);` before creating an MLIRContext
Differential Revision: https://reviews.llvm.org/D86897
show more ...
|
| #
7b00c808 |
| 28-Aug-2020 |
Mehdi Amini <[email protected]> |
Add a global flag to disable the global dialect registry "process wise"
This is intended to ease the transition for client with a lot of dependencies. It'll be removed in the coming weeks.
Differen
Add a global flag to disable the global dialect registry "process wise"
This is intended to ease the transition for client with a lot of dependencies. It'll be removed in the coming weeks.
Differential Revision: https://reviews.llvm.org/D86755
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc2 |
|
| #
f9dc2b70 |
| 18-Aug-2020 |
Mehdi Amini <[email protected]> |
Separate the Registration from Loading dialects in the Context
This changes the behavior of constructing MLIRContext to no longer load globally registered dialects on construction. Instead Dialects
Separate the Registration from Loading dialects in the Context
This changes the behavior of constructing MLIRContext to no longer load globally registered dialects on construction. Instead Dialects are only loaded explicitly on demand: - the Parser is lazily loading Dialects in the context as it encounters them during parsing. This is the only purpose for registering dialects and not load them in the context. - Passes are expected to declare the dialects they will create entity from (Operations, Attributes, or Types), and the PassManager is loading Dialects into the Context when starting a pipeline.
This changes simplifies the configuration of the registration: a compiler only need to load the dialect for the IR it will emit, and the optimizer is self-contained and load the required Dialects. For example in the Toy tutorial, the compiler only needs to load the Toy dialect in the Context, all the others (linalg, affine, std, LLVM, ...) are automatically loaded depending on the optimization pipeline enabled.
To adjust to this change, stop using the existing dialect registration: the global registry will be removed soon.
1) For passes, you need to override the method:
virtual void getDependentDialects(DialectRegistry ®istry) const {}
and registery on the provided registry any dialect that this pass can produce. Passes defined in TableGen can provide this list in the dependentDialects list field.
2) For dialects, on construction you can register dependent dialects using the provided MLIRContext: `context.getOrLoadDialect<DialectName>()` This is useful if a dialect may canonicalize or have interfaces involving another dialect.
3) For loading IR, dialect that can be in the input file must be explicitly registered with the context. `MlirOptMain()` is taking an explicit registry for this purpose. See how the standalone-opt.cpp example is setup:
mlir::DialectRegistry registry; registry.insert<mlir::standalone::StandaloneDialect>(); registry.insert<mlir::StandardOpsDialect>();
Only operations from these two dialects can be in the input file. To include all of the dialects in MLIR Core, you can populate the registry this way:
mlir::registerAllDialects(registry);
4) For `mlir-translate` callback, as well as frontend, Dialects can be loaded in the context before emitting the IR: context.getOrLoadDialect<ToyDialect>()
Differential Revision: https://reviews.llvm.org/D85622
show more ...
|
| #
e75bc5c7 |
| 19-Aug-2020 |
Mehdi Amini <[email protected]> |
Revert "Separate the Registration from Loading dialects in the Context"
This reverts commit d14cf45735b0d09d7d3caf0824779520dd20ef10. The build is broken with GCC-5.
|
| #
d14cf457 |
| 18-Aug-2020 |
Mehdi Amini <[email protected]> |
Separate the Registration from Loading dialects in the Context
This changes the behavior of constructing MLIRContext to no longer load globally registered dialects on construction. Instead Dialects
Separate the Registration from Loading dialects in the Context
This changes the behavior of constructing MLIRContext to no longer load globally registered dialects on construction. Instead Dialects are only loaded explicitly on demand: - the Parser is lazily loading Dialects in the context as it encounters them during parsing. This is the only purpose for registering dialects and not load them in the context. - Passes are expected to declare the dialects they will create entity from (Operations, Attributes, or Types), and the PassManager is loading Dialects into the Context when starting a pipeline.
This changes simplifies the configuration of the registration: a compiler only need to load the dialect for the IR it will emit, and the optimizer is self-contained and load the required Dialects. For example in the Toy tutorial, the compiler only needs to load the Toy dialect in the Context, all the others (linalg, affine, std, LLVM, ...) are automatically loaded depending on the optimization pipeline enabled.
To adjust to this change, stop using the existing dialect registration: the global registry will be removed soon.
1) For passes, you need to override the method:
virtual void getDependentDialects(DialectRegistry ®istry) const {}
and registery on the provided registry any dialect that this pass can produce. Passes defined in TableGen can provide this list in the dependentDialects list field.
2) For dialects, on construction you can register dependent dialects using the provided MLIRContext: `context.getOrLoadDialect<DialectName>()` This is useful if a dialect may canonicalize or have interfaces involving another dialect.
3) For loading IR, dialect that can be in the input file must be explicitly registered with the context. `MlirOptMain()` is taking an explicit registry for this purpose. See how the standalone-opt.cpp example is setup:
mlir::DialectRegistry registry; registry.insert<mlir::standalone::StandaloneDialect>(); registry.insert<mlir::StandardOpsDialect>();
Only operations from these two dialects can be in the input file. To include all of the dialects in MLIR Core, you can populate the registry this way:
mlir::registerAllDialects(registry);
4) For `mlir-translate` callback, as well as frontend, Dialects can be loaded in the context before emitting the IR: context.getOrLoadDialect<ToyDialect>()
Differential Revision: https://reviews.llvm.org/D85622
show more ...
|