llvm-project/mlir/lib/Parser
Vladislav Vinogradov f3bf5c053b [mlir] Model MemRef memory space as Attribute
Based on the following discussion:
https://llvm.discourse.group/t/rfc-memref-memory-shape-as-attribute/2229

The goal of the change is to make memory space property to have more
expressive representation, rather then "magic" integer values.

It will allow to have more clean ASM form:

```
gpu.func @test(%arg0: memref<100xf32, "workgroup">)

// instead of

gpu.func @test(%arg0: memref<100xf32, 3>)
```

Explanation for `Attribute` choice instead of plain `string`:

* `Attribute` classes allow to use more type safe API based on RTTI.
* `Attribute` classes provides faster comparison operator based on
  pointer comparison in contrast to generic string comparison.
* `Attribute` allows to store more complex things, like structs or dictionaries.
  It will allows to have more complex memory space hierarchy.

This commit preserve old integer-based API and implements it on top
of the new one.

Depends on D97476

Reviewed By: rriddle, mehdi_amini

Differential Revision: https://reviews.llvm.org/D96145
2021-03-10 12:57:27 +03:00
..
AffineParser.cpp [mlir][NFC] Split Parser into several different files. 2020-06-10 17:17:13 -07:00
AttributeParser.cpp Revert "Revert "Reorder MLIRContext location in BuiltinAttributes.h"" 2021-02-08 10:39:58 +01:00
CMakeLists.txt [mlir][NFC] Split Parser into several different files. 2020-06-10 17:17:13 -07:00
DialectSymbolParser.cpp [mlir] Add a DialectAsmParser::getChecked method 2021-03-04 11:53:24 -08:00
Lexer.cpp [mlir][IR][NFC] Define the Location classes in ODS instead of C++ 2021-03-08 14:32:40 -08:00
Lexer.h Mass update the MLIR license header to mention "Part of the LLVM project" 2020-01-26 03:58:30 +00:00
LocationParser.cpp [mlir][IR][NFC] Define the Location classes in ODS instead of C++ 2021-03-08 14:32:40 -08:00
Parser.cpp [mlir][IR][NFC] Define the Location classes in ODS instead of C++ 2021-03-08 14:32:40 -08:00
Parser.h [mlir][OpAsmParser] Add support for parsing integer literals without going through IntegerAttr 2020-12-14 12:00:43 -08:00
ParserState.h [mlir][NFC] Split Parser into several different files. 2020-06-10 17:17:13 -07:00
Token.cpp [AsmParser] Fix support for zero bit integer types. 2020-12-12 21:24:18 -08:00
Token.h [mlir] Optimize the parsing of ElementsAttr hex strings 2020-10-28 16:58:06 -07:00
TokenKinds.def [mlir] Add better support for f80 and f128 2021-01-15 10:29:48 -05:00
TypeParser.cpp [mlir] Model MemRef memory space as Attribute 2021-03-10 12:57:27 +03:00