|
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 |
|
| #
01eedbc7 |
| 26-Jul-2022 |
River Riddle <[email protected]> |
[mlir] Refactor SubElementInterface replace support
The current support was essentially the amount necessary to support replacing SymbolRefAttrs, but suffers from various deficiencies (both ergonomi
[mlir] Refactor SubElementInterface replace support
The current support was essentially the amount necessary to support replacing SymbolRefAttrs, but suffers from various deficiencies (both ergonomic and functional):
* Replace crashes if unsupported This makes it really hard to use safely, given that you don't know if you are going to crash or not when using it.
* Types aren't supported This seems like a simple missed addition when the attribute replacement support was originally added.
* The ergonomics are weird It currently uses an index based replacement, which makes the implementations quite clunky.
This commit refactors support to be a bit more ergonomic, and also adds support for types in the process. This was also a great oppurtunity to greatly simplify how replacement is done in the symbol table.
Fixes #56355
Differential Revision: https://reviews.llvm.org/D130589
show more ...
|
| #
f92d319c |
| 08-Jul-2022 |
Nandor Licker <[email protected]> |
[mlir] Fixed double-free bug in SymbolUserMap
`SymbolUserMap` relied on `try_emplace` and `std::move` to relocate an entry to another key. However, if this triggered the resizing of the `DenseMap`,
[mlir] Fixed double-free bug in SymbolUserMap
`SymbolUserMap` relied on `try_emplace` and `std::move` to relocate an entry to another key. However, if this triggered the resizing of the `DenseMap`, the value was destroyed before it could be moved to the new storage location, leading to a dangling `users` reference to be inserted into the map. On destruction, since a new entry was created from one that was already freed, a double-free error occurred.
Fixed issue by re-fetching the iterator after the mutation of the container.
Differential Revision: https://reviews.llvm.org/D129345
show more ...
|
|
Revision tags: 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, llvmorg-13.0.1-rc2 |
|
| #
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
|
| #
feec2d90 |
| 02-Nov-2021 |
Alex Zinenko <[email protected]> |
[mlir] return the updated symbol table after inserting into SymbolTable
Inserting a symbol into a SymbolTable may lead to the name of the symbol being changed in order to ensure uniqueness of symbol
[mlir] return the updated symbol table after inserting into SymbolTable
Inserting a symbol into a SymbolTable may lead to the name of the symbol being changed in order to ensure uniqueness of symbol names in the table. Return this new name to spare the caller the need to extract it from the symbol operation.
Depends On D112700
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D112886
show more ...
|
| #
10a80c44 |
| 28-Oct-2021 |
Markus Böck <[email protected]> |
[mlir] Implement replacement of SymbolRefAttrs in Dialect attributes using SubElementAttr interface
This patch extends the SubElementAttr interface to allow replacing a contained sub attribute. The
[mlir] Implement replacement of SymbolRefAttrs in Dialect attributes using SubElementAttr interface
This patch extends the SubElementAttr interface to allow replacing a contained sub attribute. The attribute that should be replaced is identified by an index which denotes the n-th element returned by the accompanying walkImmediateSubElements method.
Using this addition the patch implements replacing SymbolRefAttrs contained within any dialect attributes.
Differential Revision: https://reviews.llvm.org/D111357
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
| #
41d4aa7d |
| 29-Aug-2021 |
Chris Lattner <[email protected]> |
[SymbolRefAttr] Revise SymbolRefAttr to hold a StringAttr.
SymbolRefAttr is fundamentally a base string plus a sequence of nested references. Instead of storing the string data as a copies StringRe
[SymbolRefAttr] Revise SymbolRefAttr to hold a StringAttr.
SymbolRefAttr is fundamentally a base string plus a sequence of nested references. Instead of storing the string data as a copies StringRef, store it as an already-uniqued StringAttr.
This makes a lot of things simpler and more efficient because: 1) references to the symbol are already stored as StringAttr's: there is no need to copy the string data into MLIRContext multiple times. 2) This allows pointer comparisons instead of string comparisons (or redundant uniquing) within SymbolTable.cpp. 3) This allows SymbolTable to hold a DenseMap instead of a StringMap (which again copies the string data and slows lookup).
This is a moderately invasive patch, so I kept a lot of compatibility APIs around. It would be nice to explore changing getName() to return a StringAttr for example (right now you have to use getNameAttr()), and eliminate things like the StringRef version of getSymbol.
Differential Revision: https://reviews.llvm.org/D108899
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
| #
2c811548 |
| 09-Jun-2021 |
Mehdi Amini <[email protected]> |
Add llvm_unreacheable to silence warning "not all control paths return a value" (NFC)
|
| #
f492c359 |
| 07-Jun-2021 |
River Riddle <[email protected]> |
[mlir-lsp-server] Add support for hover on region operations
This revision adds support for hover on region operations, by temporarily removing the regions during printing. This revision also tweaks
[mlir-lsp-server] Add support for hover on region operations
This revision adds support for hover on region operations, by temporarily removing the regions during printing. This revision also tweaks the hover format for operations to include symbol information, now that FuncOp can be shown in the hover.
Differential Revision: https://reviews.llvm.org/D103727
show more ...
|
|
Revision tags: llvmorg-12.0.1-rc1 |
|
| #
4efb7754 |
| 15-Apr-2021 |
River Riddle <[email protected]> |
[mlir][NFC] Add a using directive for llvm::SetVector
Differential Revision: https://reviews.llvm.org/D100436
|
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
| #
973ddb7d |
| 11-Mar-2021 |
Mehdi Amini <[email protected]> |
Define a `NoTerminator` traits that allows operations with a single block region to not provide a terminator
In particular for Graph Regions, the terminator needs is just a historical artifact of th
Define a `NoTerminator` traits that allows operations with a single block region to not provide a terminator
In particular for Graph Regions, the terminator needs is just a historical artifact of the generalization of MLIR from CFG region. Operations like Module don't need a terminator, and before Module migrated to be an operation with region there wasn't any needed.
To validate the feature, the ModuleOp is migrated to use this trait and the ModuleTerminator operation is deleted.
This patch is likely to break clients, if you're in this case:
- you may iterate on a ModuleOp with `getBody()->without_terminator()`, the solution is simple: just remove the ->without_terminator! - you created a builder with `Builder::atBlockTerminator(module_body)`, just use `Builder::atBlockEnd(module_body)` instead. - you were handling ModuleTerminator: it isn't needed anymore. - for generic code, a `Block::mayNotHaveTerminator()` may be used.
Differential Revision: https://reviews.llvm.org/D98468
show more ...
|
| #
4a7aed4e |
| 09-Mar-2021 |
River Riddle <[email protected]> |
[mlir][IR] Add a new SymbolUserMap class
This class provides efficient implementations of symbol queries related to uses, such as collecting the users of a symbol, replacing all uses, etc. This prov
[mlir][IR] Add a new SymbolUserMap class
This class provides efficient implementations of symbol queries related to uses, such as collecting the users of a symbol, replacing all uses, etc. This provides similar benefits to use related queries, as SymbolTableCollection did for lookup queries.
Differential Revision: https://reviews.llvm.org/D98071
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
| #
c2c83e97 |
| 08-Feb-2021 |
Tres Popp <[email protected]> |
Revert "Revert "Reorder MLIRContext location in BuiltinAttributes.h""
This reverts commit 511dd4f4383b1c2873beac4dbea2df302f1f9d0c along with a couple fixes.
Original message: Now the context is th
Revert "Revert "Reorder MLIRContext location in BuiltinAttributes.h""
This reverts commit 511dd4f4383b1c2873beac4dbea2df302f1f9d0c along with a couple fixes.
Original message: Now the context is the first, rather than the last input.
This better matches the rest of the infrastructure and makes it easier to move these types to being declaratively specified.
Phabricator: https://reviews.llvm.org/D96111
show more ...
|
| #
511dd4f4 |
| 08-Feb-2021 |
Tres Popp <[email protected]> |
Revert "Reorder MLIRContext location in BuiltinAttributes.h"
This reverts commit 7827753f9810e846fb702f3e8dcff0bfb37344e1.
|
| #
7827753f |
| 05-Feb-2021 |
Tres Popp <[email protected]> |
Reorder MLIRContext location in BuiltinAttributes.h
Now the context is the first, rather than the last input.
This better matches the rest of the infrastructure and makes it easier to move these ty
Reorder MLIRContext location in BuiltinAttributes.h
Now the context is the first, rather than the last input.
This better matches the rest of the infrastructure and makes it easier to move these types to being declaratively specified.
Differential Revision: https://reviews.llvm.org/D96111
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 |
|
| #
fc5cf50e |
| 18-Dec-2020 |
River Riddle <[email protected]> |
[mlir] Remove the MutableDictionaryAttr class
This class used to serve a few useful purposes: * Allowed containing a null DictionaryAttr * Provided some simple mutable API around a DictionaryAttr
T
[mlir] Remove the MutableDictionaryAttr class
This class used to serve a few useful purposes: * Allowed containing a null DictionaryAttr * Provided some simple mutable API around a DictionaryAttr
The first of which is no longer an issue now that there is much better caching support for attributes in general, and a cache in the context for empty dictionaries. The second results in more trouble than it's worth because it mutates the internal dictionary on every action, leading to a potentially large number of dictionary copies. NamedAttrList is a much better alternative for the second use case, and should be modified as needed to better fit it's usage as a DictionaryAttrBuilder.
Differential Revision: https://reviews.llvm.org/D93442
show more ...
|
| #
f43e67cc |
| 15-Dec-2020 |
Tres Popp <[email protected]> |
[mlir] Allow SymbolTable to update existing symbols
Previous behavior would fail if inserting an operation that already existed. Now SymbolTable::insert can also be used as a way to make a symbol's
[mlir] Allow SymbolTable to update existing symbols
Previous behavior would fail if inserting an operation that already existed. Now SymbolTable::insert can also be used as a way to make a symbol's name unique even after insertion.
Further TODOs have been left over naming and consistent behavior considerations.
Differential Revision: https://reviews.llvm.org/D93349
show more ...
|
|
Revision tags: llvmorg-11.0.1-rc1 |
|
| #
8b5a3e46 |
| 09-Nov-2020 |
Rahul Joshi <[email protected]> |
[MLIR] Change FuncOp assembly syntax to print visibility inline instead of in attrib dict.
- Change syntax for FuncOp to be `func <visibility>? @name` instead of printing the visibility in the att
[MLIR] Change FuncOp assembly syntax to print visibility inline instead of in attrib dict.
- Change syntax for FuncOp to be `func <visibility>? @name` instead of printing the visibility in the attribute dictionary. - Since printFunctionLikeOp() and parseFunctionLikeOp() are also used by other operations, make the "inline visibility" an opt-in feature. - Updated unit test to use and check the new syntax.
Differential Revision: https://reviews.llvm.org/D90859
show more ...
|
| #
73547b08 |
| 29-Oct-2020 |
River Riddle <[email protected]> |
[mlir][SymbolTable] Small optimization to walking symbol references
* Check region count for unknown symbol tables first, as it is a faster check * Add an accessor to MutableDictionaryAttr to get th
[mlir][SymbolTable] Small optimization to walking symbol references
* Check region count for unknown symbol tables first, as it is a faster check * Add an accessor to MutableDictionaryAttr to get the internal dictionary without creating a new one if it is empty. This avoids an otherwise unnecessary lookup of an MLIRContext.
show more ...
|
| #
eda450bb |
| 27-Oct-2020 |
River Riddle <[email protected]> |
[mlir][SymbolTable] Use Identifier instead of StringRef when looking up symbol name attributes
Using an Identifier is much more efficient for attribute lookups because it uses pointer comparison as
[mlir][SymbolTable] Use Identifier instead of StringRef when looking up symbol name attributes
Using an Identifier is much more efficient for attribute lookups because it uses pointer comparison as opposed to string comparison.
Differential Revision: https://reviews.llvm.org/D89660
show more ...
|
| #
71eeb5ec |
| 16-Oct-2020 |
River Riddle <[email protected]> |
[mlir] Add a new SymbolUserOpInterface class
The initial goal of this interface is to fix the current problems with verifying symbol user operations, but can extend beyond that in the future. The cu
[mlir] Add a new SymbolUserOpInterface class
The initial goal of this interface is to fix the current problems with verifying symbol user operations, but can extend beyond that in the future. The current problems with the verification of symbol uses are: * Extremely inefficient: Most current symbol users perform the symbol lookup using the slow O(N) string compare methods, which can lead to extremely long verification times in large modules. * Invalid/break the constraints of verification pass If the symbol reference is not-flat(and even if it is flat in some cases) a verifier for an operation is not permitted to touch the referenced operation because it may be in the process of being mutated by a different thread within the pass manager.
The new SymbolUserOpInterface exposes a method `verifySymbolUses` that will be invoked from the parent symbol table to allow for verifying the constraints of any referenced symbols. This method is passed a `SymbolTableCollection` to allow for O(1) lookups of any necessary symbol operation.
Differential Revision: https://reviews.llvm.org/D89512
show more ...
|
| #
7bc7d0ac |
| 16-Oct-2020 |
River Riddle <[email protected]> |
[mlir] Optimize symbol related checks in SymbolDCE
This revision contains two optimizations related to symbol checking: * Optimize SymbolOpInterface to only check for a name attribute if the operati
[mlir] Optimize symbol related checks in SymbolDCE
This revision contains two optimizations related to symbol checking: * Optimize SymbolOpInterface to only check for a name attribute if the operation is an optional symbol. This removes an otherwise unnecessary attribute lookup from a majority of symbols. * Add a new SymbolTableCollection class to represent a collection of SymbolTables. This allows for perfoming non-flat symbol lookups in O(1) time by caching SymbolTables for symbol table operations. This class is very useful for algorithms that operate on multiple symbol tables, either recursively or not.
Differential Revision: https://reviews.llvm.org/D89505
show more ...
|
| #
cc83dc19 |
| 07-Oct-2020 |
Christian Sigg <[email protected]> |
Import llvm::StringSwitch into mlir namespace.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D88971
|
|
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, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3 |
|
| #
ee394e68 |
| 29-Jun-2020 |
Rahul Joshi <[email protected]> |
[MLIR] Add variadic isa<> for Type, Value, and Attribute
- Also adopt variadic llvm::isa<> in more places. - Fixes https://bugs.llvm.org/show_bug.cgi?id=46445
Differential Revision: https://reviews
[MLIR] Add variadic isa<> for Type, Value, and Attribute
- Also adopt variadic llvm::isa<> in more places. - Fixes https://bugs.llvm.org/show_bug.cgi?id=46445
Differential Revision: https://reviews.llvm.org/D82769
show more ...
|
|
Revision tags: llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
| #
5eae715a |
| 06-May-2020 |
Jacques Pienaar <[email protected]> |
[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 i
[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
show more ...
|