llvm-project/mlir/include/mlir-c
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
..
Bindings/Python Add basic JIT Python Bindings 2021-03-03 18:19:40 +00:00
Dialect [mlir][CAPI] Introduce standard source layout for mlir-c dialect registration. 2021-01-11 12:35:49 -08:00
AffineExpr.h [mlir] Use more C99 comments in C API header files 2021-01-25 19:23:06 +01:00
AffineMap.h [mlir] Use more C99 comments in C API header files 2021-01-25 19:23:06 +01:00
BuiltinAttributes.h [mlir][IR] Refactor the `getChecked` and `verifyConstructionInvariants` methods on Attributes/Types 2021-02-22 17:37:49 -08:00
BuiltinTypes.h [mlir] Model MemRef memory space as Attribute 2021-03-10 12:57:27 +03:00
Conversion.h Add C bindings for mlir::ExecutionEngine 2021-03-03 18:19:40 +00:00
Diagnostics.h [mlir] Use more C99 comments in C API header files 2021-01-25 19:23:06 +01:00
ExecutionEngine.h Add basic JIT Python Bindings 2021-03-03 18:19:40 +00:00
IR.h [MLIR] Add context accessor to identifier 2021-02-09 13:21:30 -08:00
IntegerSet.h [mlir] Add C API for IntegerSet 2021-01-25 20:16:22 +01:00
Pass.h [mlir] Use more C99 comments in C API header files 2021-01-25 19:23:06 +01:00
Registration.h Add C bindings for mlir::ExecutionEngine 2021-03-03 18:19:40 +00:00
Support.h [mlir] Use more C99 comments in C API header files 2021-01-25 19:23:06 +01:00
Transforms.h [mlir][CAPI] Proposal: Always building a libMLIRPublicAPI.so (re-apply). 2020-11-08 16:57:51 -08:00