llvm-project/mlir/tools/mlir-tblgen
Jacques Pienaar 5eae715a31 [mlir] Add NamedAttrList
This is a wrapper around vector of NamedAttributes that keeps track of whether sorted and does some minimal effort to remain sorted (doing more, e.g., appending attributes in sorted order, could be done in follow up). It contains whether sorted and if a DictionaryAttr is queried, it caches the returned DictionaryAttr along with whether sorted.

Change MutableDictionaryAttr to always return a non-null Attribute even when empty (reserve null cases for errors). To this end change the getter to take a context as input so that the empty DictionaryAttr could be queried. Also create one instance of the empty dictionary attribute that could be reused without needing to lock context etc.

Update infer type op interface to use DictionaryAttr and use NamedAttrList to avoid incurring multiple conversion costs.

Fix bug in sorting helper function.

Differential Revision: https://reviews.llvm.org/D79463
2020-05-07 12:33:36 -07:00
..
CMakeLists.txt [MLIR] Reapply: Adjust libMLIR building to more closely follow libClang 2020-05-04 20:47:57 -07:00
DialectGen.cpp [llvm][StringExtras] Merge StringExtras from MLIR into LLVM 2020-04-14 18:57:22 -07:00
DocGenUtilities.h Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
EnumsGen.cpp [mlir][EnumGen] Generate utility symbolizeEnum and stringifyEnum methods during EnumGen 2020-04-12 19:08:08 -07:00
LLVMIRConversionGen.cpp [mlir][ODS] Add support for optional operands and results with a new Optional directive. 2020-04-10 14:12:06 -07:00
LLVMIRIntrinsicGen.cpp [mlir][NFC] Remove the STLExtras.h header file now that it has been merged into LLVM. 2020-04-14 15:14:41 -07:00
OpDefinitionsGen.cpp [mlir] Add NamedAttrList 2020-05-07 12:33:36 -07:00
OpDocGen.cpp [mlir] Revamp operation documentation generation 2020-03-24 12:05:18 -07:00
OpFormatGen.cpp [mlir] Add NamedAttrList 2020-05-07 12:33:36 -07:00
OpFormatGen.h [mlir] Add initial support for parsing a declarative operation assembly format 2020-01-30 11:43:40 -08:00
OpInterfacesGen.cpp [mlir][OpInterfaceGen] Emit the utility Trait decl as a class and not using directive 2020-04-30 11:07:58 -07:00
PassDocGen.cpp [mlir][Pass] Update the PassGen to generate base classes instead of utilities 2020-04-07 14:08:52 -07:00
PassGen.cpp [mlir][NFC] Refactor ClassID into a TypeID class. 2020-04-10 23:52:33 -07:00
RewriterGen.cpp Revert "[mlir][drr] NFC: avoid SmallVector when collecting substitution values" 2020-04-24 15:33:03 -04:00
SPIRVUtilsGen.cpp [mlir][spirv] Serialize all operands together if possible 2020-05-07 09:32:03 -04:00
StructsGen.cpp Support OptionalAttr inside a StructAttr 2020-02-19 12:47:04 +00:00
mlir-tblgen.cpp Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00