[all-commits] [llvm/llvm-project] aab7e2: [MLIR][Parser] Fix AffineParser colliding bare ide...

Kunwar Shaanjeet Singh Grover via All-commits all-commits at lists.llvm.org
Mon Jun 27 11:44:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aab7e2fa05c0ad9bc8ffb40f058512d41d980135
      https://github.com/llvm/llvm-project/commit/aab7e2fa05c0ad9bc8ffb40f058512d41d980135
  Author: Groverkss <groverkss at gmail.com>
  Date:   2022-06-27 (Mon, 27 Jun 2022)

  Changed paths:
    M mlir/lib/Parser/AffineParser.cpp
    M mlir/test/IR/affine-map.mlir
    M mlir/test/IR/invalid-affinemap.mlir

  Log Message:
  -----------
  [MLIR][Parser] Fix AffineParser colliding bare identifiers with primitive types

The parser currently can't parse bare identifiers like 'i0' in affine
maps and sets, and similarly ids like f16/f32. But these bare ids are
part of the grammar - although they are primitive types.

```
error: expected bare identifier
set = affine_set<(i0, i1) : ()>
                   ^
```

This patch allows the parser for AffineMap/IntegerSet to parse bare
identifiers as defined by the grammer.

Reviewed By: bondhugula, rriddle

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




More information about the All-commits mailing list