aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorwren romano <2998727+wrengr@users.noreply.github.com>2023-07-19 16:55:22 -0700
committerwren romano <2998727+wrengr@users.noreply.github.com>2023-07-20 15:56:03 -0700
commit889f4bf26406d22e24b7e85bb4f6a8eb57d04fb7 (patch)
tree94025f666a8c3fb5e4b84a298e3df33b9f5f03ac /clang/lib/Lex/ModuleMap.cpp
parentbf0992c7184407da420ced5bbfa9c718d0cf6d5b (diff)
downloadllvm-889f4bf26406d22e24b7e85bb4f6a8eb57d04fb7.zip
llvm-889f4bf26406d22e24b7e85bb4f6a8eb57d04fb7.tar.gz
llvm-889f4bf26406d22e24b7e85bb4f6a8eb57d04fb7.tar.bz2
[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
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions