[mlir][sparse] add affine parsing to new surface syntax for STEA
authorAart Bik <ajcbik@google.com>
Fri, 30 Jun 2023 20:05:01 +0000 (13:05 -0700)
committerAart Bik <ajcbik@google.com>
Fri, 30 Jun 2023 21:48:23 +0000 (14:48 -0700)
commitb939c015a4ad1f1d07f93d322e7dbe2feb0a13bc
tree55199a1d6b8a2189ac9374cf4c4e605231c57923
parent5bf8efd269f8b75b5be40f087f231d71f744885c
[mlir][sparse] add affine parsing to new surface syntax for STEA

(1) uses the previously introduce API to reuse AffineExpr parser without codedup
(2) solves the look-ahead problem when parsing level spec

Reviewed By: Peiming

Differential Revision: https://reviews.llvm.org/D154254
mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp
mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp
mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.h
mlir/lib/Dialect/SparseTensor/IR/Detail/Var.cpp
mlir/lib/Dialect/SparseTensor/IR/Detail/Var.h
mlir/test/Dialect/SparseTensor/roundtrip_encoding.mlir