[all-commits] [llvm/llvm-project] 9b3a08: [mlir][affinexpr] add parseAffineExpr to parser API

Aart Bik via All-commits all-commits at lists.llvm.org
Thu Jun 29 23:44:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9b3a080328370f0257bde2528b9c0b1616c2d98b
      https://github.com/llvm/llvm-project/commit/9b3a080328370f0257bde2528b9c0b1616c2d98b
  Author: Aart Bik <ajcbik at google.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M mlir/include/mlir/IR/OpImplementation.h
    M mlir/lib/AsmParser/AffineParser.cpp
    M mlir/lib/AsmParser/AsmParserImpl.h
    M mlir/lib/AsmParser/Parser.h

  Log Message:
  -----------
  [mlir][affinexpr] add parseAffineExpr to parser API

Similar to AffineMap and IntegerSet parsing, this change makes the more fine-grained AffineExpr available for general parsing, using a preset symbol set to recognize variables.

Motivation:
The AffineExpr parser will be used by the new sparse tensor encoding surface syntax. Originally, we planned to duplicate the affine parser completely, but that would be a terrible waste of a good thing. With this minor API change, we prepare the way for the sparse tensor dialect (and others) to reuse the AffineExpr parser outside the context of a more restricted AffineMap parser.

Reviewed By: Peiming

Differential Revision: https://reviews.llvm.org/D154177




More information about the All-commits mailing list