llvm-capstone/mlir
wren romano 889f4bf264 [mlir][sparse] Improve DimLvlMapParser's handling of variable bindings
This commit comprises a number of related changes:

(1) Reintroduces the semantic distinction between `parseVarUsage` vs `parseVarBinding`, adds documentation explaining the distinction, and adds commentary to the one place that violates the desired/intended semantics.

(2) Improves documentation/commentary about the forward-declaration of level-vars, and about the meaning of the `bool` parameter to `parseLvlSpec`.

(2) Removes the `VarEnv::addVars` method, and instead has `DimLvlMapParser` handle the conversion issues directly.  In particular, the parser now stores and maintains the `{dims,lvls}AndSymbols` arrays, thereby avoiding the O(n^2) behavior of scanning through the entire `VarEnv` for each `parse{Dim,Lvl}Spec` call.  Unfortunately there still remains another source of O(n^2) behavior, namely: the `AsmParser::parseAffineExpr` method will copy the `DimLvlMapParser::{dims,lvls}AndSymbols` arrays into `AffineParser::dimsAndSymbols` on each `parse{Dim,Lvl}Spec` call; but fixing that would require extensive changes to `AffineParser` itself.

Depends On D155532

Reviewed By: Peiming

Differential Revision: https://reviews.llvm.org/D155533
2023-07-20 15:56:03 -07:00
..
benchmark/python [NFC][Py Reformat] Reformat python files in mlir subdir 2023-05-26 08:05:40 +02:00
cmake/modules [mlir][python] Add install target for MLIR Python sources. 2023-07-18 11:05:39 -07:00
docs [mlir][python] Remove PythonAttr mapping functionality 2023-07-18 12:21:28 -04:00
examples [mlir][python] Remove PythonAttr mapping functionality 2023-07-18 12:21:28 -04:00
include [ODS] Use Adaptor Trait for Shaped Type Inference 2023-07-20 19:41:08 +00:00
lib [mlir][sparse] Improve DimLvlMapParser's handling of variable bindings 2023-07-20 15:56:03 -07:00
python [mlir][transform][python] Add extended ApplyPatternsOp. 2023-07-20 14:20:50 +00:00
test [mlir][sparse] Improve DimLvlMapParser's handling of variable bindings 2023-07-20 15:56:03 -07:00
tools [mlir][Linalg] Cleanup the drop unit dims pass in Linalg. 2023-07-19 17:47:18 +00:00
unittests [MLIR][Presburger] Implement domain and range restriction for PresburgerRelation 2023-07-18 19:12:12 +05:30
utils New features and bug fix in MLIR test generation tool 2023-07-07 18:15:11 +00:00
.clang-format
.clang-tidy
CMakeLists.txt [mlir] Don't make the ROCm conversions depend on the execution engine 2023-07-13 20:40:08 +00:00
LICENSE.TXT
README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.