llvm-project/mlir
ergawy bddaa7a848 [MLIR][SPIRV] Support identified and recursive structs.
This PR adds support for identified and recursive structs.
This includes: parsing, printing, serializing, and
deserializing such structs.

The following C struct:

```C
struct A {
  A* next;
};
```

which is translated to the following MLIR code as:

```mlir
!spv.struct<A, (!spv.ptr<!spv.struct<A>, Generic>)>
```

would be represented in the SPIR-V module as:

```spirv
OpName %A "A"
OpTypeForwardPointer %APtr Generic
%A = OpTypeStruct %APtr
%APtr = OpTypePointer Generic %A
```

In particular the following changes are included:
- SPIR-V structs can now be either identified or literal
  (i.e. non-identified).
- All structs now have their members surrounded by a ()-pair.
- For recursive references,
  (1) an OpTypeForwardPointer instruction is emitted before
  the OpTypeStruct instruction defining the recursive struct
  (2) an OpTypePointer instruction is emitted after the
  OpTypeStruct instruction which actually defines the recursive
  pointer to struct type.

Reviewed By: antiagainst, rriddle, ftynse

Differential Revision: https://reviews.llvm.org/D87206
2020-10-13 10:18:21 -04:00
..
cmake/modules Revert "[RFC] Factor out repetitive cmake patterns for llvm-style projects" 2020-10-04 15:17:34 -07:00
docs [mlir][Linalg] Add named Linalg ops on tensor to buffer support. 2020-10-12 11:20:23 +00:00
examples Revert "[RFC] Factor out repetitive cmake patterns for llvm-style projects" 2020-10-04 15:17:34 -07:00
include [MLIR][SPIRV] Support identified and recursive structs. 2020-10-13 10:18:21 -04:00
integration_test [mlir][Linalg] Temporarily circumvent TensorConstant bufferize bug 2020-10-12 20:23:57 +00:00
lib [MLIR][SPIRV] Support identified and recursive structs. 2020-10-13 10:18:21 -04:00
test [MLIR][SPIRV] Support identified and recursive structs. 2020-10-13 10:18:21 -04:00
tools [mlir-vulkan-runner] Clean up some stale CMake configurations 2020-10-13 10:15:54 -04:00
unittests [mlir] Fix bug in computing operation order 2020-10-09 12:18:52 +01:00
utils Add GDB prettyprinters for a few more MLIR types. 2020-09-30 21:22:47 +02:00
.clang-format
.clang-tidy Fix MLIR clang-tidy: when tweaking it does not inherit from the parent 2020-03-07 17:44:21 +00:00
CMakeLists.txt Revert "[RFC] Factor out repetitive cmake patterns for llvm-style projects" 2020-10-04 15:17:34 -07:00
LICENSE.TXT Add the Apache2 with LLVM exceptions license to MLIR 2019-12-24 00:58:06 -08:00
README.md mlir README.md: Fix the syntax 2019-12-24 13:31:07 +01:00

README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.