llvm-project/mlir/test/Conversion
Alex Zinenko 2230bf99c7 [mlir] replace LLVMIntegerType with built-in integer type
The LLVM dialect type system has been closed until now, i.e. did not support
types from other dialects inside containers. While this has had obvious
benefits of deriving from a common base class, it has led to some simple types
being almost identical with the built-in types, namely integer and floating
point types. This in turn has led to a lot of larger-scale complexity: simple
types must still be converted, numerous operations that correspond to LLVM IR
intrinsics are replicated to produce versions operating on either LLVM dialect
or built-in types leading to quasi-duplicate dialects, lowering to the LLVM
dialect is essentially required to be one-shot because of type conversion, etc.
In this light, it is reasonable to trade off some local complexity in the
internal implementation of LLVM dialect types for removing larger-scale system
complexity. Previous commits to the LLVM dialect type system have adapted the
API to support types from other dialects.

Replace LLVMIntegerType with the built-in IntegerType plus additional checks
that such types are signless (these are isolated in a utility function that
replaced `isa<LLVMType>` and in the parser). Temporarily keep the possibility
to parse `!llvm.i32` as a synonym for `i32`, but add a deprecation notice.

Reviewed By: mehdi_amini, silvas, antiagainst

Differential Revision: https://reviews.llvm.org/D94178
2021-01-07 19:48:31 +01:00
..
AVX512ToLLVM [mlir][vector][avx512] move avx512 lowering pass into general vector lowering 2020-12-03 17:23:46 -08:00
AffineToStandard [MLIR] Fix lowering of affine operations with return values 2020-12-22 21:44:31 +05:30
ArmNeonToLLVM [mlir][ArmNeon][RFC] Add a Neon dialect 2020-12-11 13:49:40 +00:00
ArmSVEToLLVM [mlir][ArmSVE][RFC] Add an ArmSVE dialect 2020-12-14 21:35:01 +00:00
AsyncToLLVM [mlir] Async: add support for lowering async value operands to LLVM 2020-12-25 02:25:20 -08:00
GPUCommon [mlir] replace LLVMIntegerType with built-in integer type 2021-01-07 19:48:31 +01:00
GPUToCUDA [mlir] switch the modeling of LLVM types to use the new mechanism 2020-08-04 14:29:25 +02:00
GPUToNVVM [mlir] replace LLVMIntegerType with built-in integer type 2021-01-07 19:48:31 +01:00
GPUToROCDL [mlir] replace LLVMIntegerType with built-in integer type 2021-01-07 19:48:31 +01: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] Create a pass for testing SCFToSPIRV patterns 2020-12-23 14:31:55 -05:00
GPUToVulkan [mlir] replace LLVMIntegerType with built-in integer type 2021-01-07 19:48:31 +01:00
LinalgToSPIRV [MLIR][SPIRV] Rename `spv._merge` to `spv.mlir.merge` 2020-11-19 10:04:35 -05:00
LinalgToVector [mlir][AsmPrinter] Refactor printing to only print aliases for attributes/types that will exist in the output. 2020-11-09 21:54:47 -08:00
OpenMPToLLVM [mlir] replace LLVMIntegerType with built-in integer type 2021-01-07 19:48:31 +01:00
PDLToPDLInterp [mlir] Add a conversion pass between PDL and the PDL Interpreter Dialect 2020-10-26 18:01:06 -07:00
SCFToGPU [mlir][gpu] Only transform mapped parallel loops to GPU. 2020-11-13 09:15:17 +01:00
SCFToOpenMP [mlir] Add conversion from SCF parallel loops to OpenMP 2020-11-24 21:12:56 +01:00
SCFToSPIRV [mlir][spirv] Create a pass for testing SCFToSPIRV patterns 2020-12-23 14:31:55 -05:00
SCFToStandard [mlir] Avoid cloning ops in SCF parallel conversion to CFG 2020-11-23 14:01:22 +01:00
SPIRVToLLVM [mlir] replace LLVMIntegerType with built-in integer type 2021-01-07 19:48:31 +01:00
ShapeToStandard [mlir] Move `std.tensor_cast` -> `tensor.cast`. 2020-12-17 16:06:56 -08:00
StandardToLLVM [mlir] replace LLVMIntegerType with built-in integer type 2021-01-07 19:48:31 +01:00
StandardToSPIRV [mlir][spirv] Convert functions returning one value 2020-12-23 13:27:31 -05:00
VectorToLLVM [mlir] replace LLVMIntegerType with built-in integer type 2021-01-07 19:48:31 +01:00
VectorToROCDL [mlir] switch the modeling of LLVM types to use the new mechanism 2020-08-04 14:29:25 +02:00
VectorToSCF [mlir][AsmPrinter] Refactor printing to only print aliases for attributes/types that will exist in the output. 2020-11-09 21:54:47 -08:00
VectorToSPIRV [mlir][spirv] Add VectorInsertDynamicOp and vector.insertelement lowering 2020-11-10 09:49:12 +01:00