llvm-project/mlir/test/Conversion
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
..
AVX512ToLLVM [mlir][AVX512] Start a primitive AVX512 dialect 2020-03-20 14:11:57 -04:00
AffineToStandard [mlir][AffineToStandard] Make LowerAffine pass Op-agnostic. 2020-07-27 12:14:17 -07:00
GPUCommon [mlir] Stop allowing LLVMType Int arguments for GPULaunchFuncOp. 2020-09-24 11:16:23 +02:00
GPUToCUDA [mlir] switch the modeling of LLVM types to use the new mechanism 2020-08-04 14:29:25 +02:00
GPUToNVVM Added std.floor operation to match std.ceil 2020-08-18 10:25:32 -07:00
GPUToROCDL Added std.floor operation to match std.ceil 2020-08-18 10:25:32 -07:00
GPUToROCm [mlir] switch the modeling of LLVM types to use the new mechanism 2020-08-04 14:29:25 +02:00
GPUToSPIRV [MLIR][SPIRV] Support identified and recursive structs. 2020-10-13 10:18:21 -04:00
GPUToVulkan [MLIR][SPIRV] Support identified and recursive structs. 2020-10-13 10:18:21 -04:00
LinalgToSPIRV [mlir][Linalg] Uniformize linalg.generic with named ops. 2020-09-22 04:13:22 -04:00
LinalgToVector [mlir][Linalg] Tile sizes for Conv ops vectorization added as pass arguments 2020-09-30 11:31:28 +00:00
OpenMPToLLVM [OpenMP][MLIR] Conversion pattern for OpenMP to LLVM 2020-08-27 19:32:15 +01:00
SCFToGPU [mlir][SCFToGPU] LaunchOp propagate optional attributes 2020-09-25 09:21:16 +02:00
SCFToStandard [mlir] Refactor BoolAttr to be a special case of IntegerAttr 2020-06-04 16:41:24 -07:00
SPIRVToLLVM [MLIR][SPIRV] Support identified and recursive structs. 2020-10-13 10:18:21 -04:00
ShapeToStandard [mlir] Type erase inputs to select statements in shape.broadcast lowering. 2020-10-11 21:58:06 +02:00
StandardToLLVM [mlir] Split alloc-like op LLVM lowerings into base and separate derived classes. 2020-10-05 17:36:01 +02:00
StandardToSPIRV [MLIR][SPIRV] Support identified and recursive structs. 2020-10-13 10:18:21 -04:00
VectorToLLVM [llvm][mlir] Promote the experimental reduction intrinsics to be first class intrinsics. 2020-10-07 10:36:44 -07:00
VectorToROCDL [mlir] switch the modeling of LLVM types to use the new mechanism 2020-08-04 14:29:25 +02:00
VectorToSCF [mlir][VectorOps] Redo the scalar loop emission in VectoToSCF to pad instead of clipping 2020-09-08 11:15:25 +02:00
VectorToSPIRV [mlir][spirv] Add Vector to SPIR-V conversion pass 2020-10-06 11:53:23 -07:00