[all-commits] [llvm/llvm-project] d93d8f: [MLIR][SPIRVToLLVM] Implemented conversion for ari...

George Mitenkov via All-commits all-commits at lists.llvm.org
Wed Jun 10 16:14:15 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d93d8fcdec68211fd3ac7f586fa67bc065acef6a
      https://github.com/llvm/llvm-project/commit/d93d8fcdec68211fd3ac7f586fa67bc065acef6a
  Author: George Mitenkov <georgemitenk0v at gmail.com>
  Date:   2020-06-10 (Wed, 10 Jun 2020)

  Changed paths:
    M mlir/include/mlir/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.h
    M mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
    A mlir/test/Conversion/SPIRVToLLVM/arithmetic-ops-to-llvm.mlir
    A mlir/test/Conversion/SPIRVToLLVM/bitwise-ops-to-llvm.mlir
    R mlir/test/Conversion/SPIRVToLLVM/convert-to-llvm.mlir

  Log Message:
  -----------
  [MLIR][SPIRVToLLVM] Implemented conversion for arithmetic ops and 3 bitwise ops.

Following the previous revision `D81100`, this commit implements a templated class
that would provide conversion patterns for “straightforward” SPIR-V ops into
LLVM dialect. Templating allows to abstract away from concrete implementation
for each specific op. Those are mainly binary operations. Currently supported
and tested ops are:
- Arithmetic ops: `IAdd`, `ISub`, `IMul`, `FAdd`, `FSub`, `FMul`, `FDiv`,  `FNegate`,
  `SDiv`, `SRem` and  `UDiv`
- Bitwise ops: `BitwiseAnd`, `BitwiseOr`, `BitwiseXor`

The implementation relies on `SPIRVToLLVMConversion` class that makes use of
`OpConversionPattern`.

Differential Revision: https://reviews.llvm.org/D81305




More information about the All-commits mailing list