llvm-project/mlir/lib/IR
Vladislav Vinogradov 59f59d1c62 [mlir] Allow to override type/attr aliases from various hooks
Use new return type for `OpAsmDialectInterface::getAlias`:

* `AliasResult::NoAlias` if an alias was not provided.
* `AliasResult::OverridableAlias` if an alias was provided, but it might be overriden by other hook.
* `AliasResult::FinalAlias` if an alias was provided and it should be used (no other hooks will be checked).

In that case `AsmPrinter` will use either the first alias with `FinalAlias` result or
the last alias with `OverridableAlias` result (it depends on dialect array order).

Used `OverridableAlias` result for `BuiltinOpAsmDialectInterface`.

Use case: provide more informative alias for built-in attributes like `AffineMapAttr`
instead of generic "map<N>".

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D107437
2021-08-06 12:05:31 +03:00
..
AffineExpr.cpp s[mlir] Tighten computation of inferred SubView result type. 2021-02-11 22:38:16 +00:00
AffineExprDetail.h [mlir] Remove the use of "kinds" from Attributes and Types 2020-08-18 16:20:14 -07:00
AffineMap.cpp [mlir] NFC - Add AffineMap::replace variant with dim/symbol inference 2021-07-14 20:29:12 +00:00
AffineMapDetail.h Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
AsmPrinter.cpp [mlir] Allow to override type/attr aliases from various hooks 2021-08-06 12:05:31 +03:00
AttributeDetail.h [mlir][IR] Move the remaining builtin attributes to ODS. 2021-03-16 16:31:53 -07:00
Attributes.cpp [mlir][NFC] Move several small methods from .cpp to .h to allow more aggressive inlining 2021-06-23 00:52:26 +00:00
Block.cpp Use early exist and simplify a condition in Block SuccessorRange (NFC) 2021-06-16 19:42:41 +00:00
Builders.cpp [MLIR] Add `getI8Type` to `OpBuilder` 2021-08-03 11:42:39 +02:00
BuiltinAttributes.cpp Defend early against operation created without a registered dialect 2021-07-15 03:52:32 +00:00
BuiltinDialect.cpp [mlir] Allow to override type/attr aliases from various hooks 2021-08-06 12:05:31 +03:00
BuiltinTypes.cpp [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
CMakeLists.txt [mlir] Add new SubElementAttr/SubElementType Interfaces 2021-06-10 17:23:07 -07:00
Diagnostics.cpp Adding missing filter check to SourceMgrDiagnosticHandler::EmitDiagnostics 2021-08-04 23:52:00 +00:00
Dialect.cpp [mlir] Fix delayed object interfaces registration 2021-08-03 12:21:55 +03:00
Dominance.cpp [Dominators] Rewrite the dominator implementation for efficiency. NFC. 2021-06-01 14:46:37 -07:00
FunctionImplementation.cpp [IR] Add a Location to BlockArgument 2021-05-23 14:10:00 -07:00
FunctionSupport.cpp [MLIR] Add argument insertion helpers for FunctionLike 2021-07-01 09:18:57 +02:00
IntegerSet.cpp [MLIR][NFC] drop some unnecessary includes 2020-03-27 09:17:27 +05:30
IntegerSetDetail.h Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
Location.cpp [mlir] Add support for walking locations similarly to Operations 2021-04-15 16:09:34 -07:00
MLIRContext.cpp Update MLIRContext to allow injecting an external ThreadPool (NFC) 2021-07-01 22:17:47 +00:00
Operation.cpp [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
OperationSupport.cpp Implement recursive support into OperationEquivalence::isEquivalentTo() 2021-07-29 05:06:37 +00:00
PatternMatch.cpp [mlir][Pattern] Add better support for using interfaces/traits to match root operations in rewrite patterns 2021-03-23 14:05:33 -07:00
Region.cpp [mlir][NFC] Move several small methods from .cpp to .h to allow more aggressive inlining 2021-06-23 00:52:26 +00:00
RegionKindInterface.cpp [MLIR] Add RegionKindInterface 2020-07-15 14:27:05 -07:00
SubElementInterfaces.cpp [mlir] Add new SubElementAttr/SubElementType Interfaces 2021-06-10 17:23:07 -07:00
SymbolTable.cpp Add llvm_unreacheable to silence warning "not all control paths return a value" (NFC) 2021-06-09 00:42:57 +00:00
TensorEncoding.cpp [mlir][tensors] Introduce attribute interface/attribute for tensor encoding 2021-04-26 18:31:54 -07:00
TypeDetail.h [mlir] Compare elements directly rather than creating pair first 2021-03-24 14:39:11 -07:00
TypeRange.cpp [mlir][IR] Refactor the internal implementation of Value 2021-03-03 14:33:37 -08:00
TypeUtilities.cpp [mlir] Correct verifyCompatibleShapes 2021-03-11 13:04:10 +01:00
Types.cpp [mlir][NFC] Move several small methods from .cpp to .h to allow more aggressive inlining 2021-06-23 00:52:26 +00:00
Value.cpp [mlir][NFC] Split the non-templated bits out of IROperand into a base class 2021-06-02 12:48:37 -07:00
Verifier.cpp Defend early against operation created without a registered dialect 2021-07-15 03:52:32 +00:00
Visitors.cpp [mlir] Add 'Skip' result to Operation visitor 2021-03-06 00:02:20 +02:00