llvm-project/flang/lib/Optimizer
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
..
Dialect [mlir] Add NamedAttrList 2020-05-07 12:33:36 -07:00
Support [flang] Support for making unique internal names. 2020-04-24 17:27:31 -07:00
.clang-format [flang] [LLVMify F18] Compiler module folders should have capitalised names (flang-compiler/f18#980) 2020-02-25 07:11:52 -08:00
CMakeLists.txt [flang] Add Fortran IR (FIR) MLIR dialect implementation (flang-compiler/f18#1035) 2020-03-11 21:47:22 -07:00