[spirv] Start the SPIR-V dialect
authorLei Zhang <antiagainst@google.com>
Sun, 26 May 2019 12:43:20 +0000 (05:43 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 2 Jun 2019 03:03:33 +0000 (20:03 -0700)
commitfba1d50b85c29c151f243aa3fcc2cb12fa3543fb
tree0ec9bdc90ace3543de711478301e0054e1822a31
parent9e21ab8f522265d37159372dbce96f66488c4e34
[spirv] Start the SPIR-V dialect

    This CL sets up the basic structure for a SPIR-V dialect: operation
    definition specification, dialect registration, testing, etc.
    A single op, FMul, is defined and tested to showcase.

    The SPIR-V dialect aims to be a simple proxy for the SPIR-V binary format
    to enable straightforward and lightweight conversion from/to the binary
    format. Ops in this dialect should stay as the same semantic level and
    try to be a mechanical mapping to the corresponding SPIR-V instructions;
    but they can deviate representationally to allow using MLIR mechanisms.

--

PiperOrigin-RevId: 250040830
13 files changed:
mlir/include/mlir/CMakeLists.txt
mlir/include/mlir/IR/DialectSymbolRegistry.def
mlir/include/mlir/SPIRV/CMakeLists.txt [new file with mode: 0644]
mlir/include/mlir/SPIRV/SPIRVDialect.h [new file with mode: 0644]
mlir/include/mlir/SPIRV/SPIRVOps.h [new file with mode: 0644]
mlir/include/mlir/SPIRV/SPIRVOps.td [new file with mode: 0644]
mlir/lib/CMakeLists.txt
mlir/lib/SPIRV/CMakeLists.txt [new file with mode: 0644]
mlir/lib/SPIRV/DialectRegistration.cpp [new file with mode: 0644]
mlir/lib/SPIRV/SPIRVDialect.cpp [new file with mode: 0644]
mlir/lib/SPIRV/SPIRVOps.cpp [new file with mode: 0644]
mlir/test/SPIRV/ops.mlir [new file with mode: 0644]
mlir/tools/mlir-opt/CMakeLists.txt