Lei Zhang 0117865412 [mlir][spirv] NFC: Shuffle code around to better follow convention
This commit shuffles SPIR-V code around to better follow MLIR
convention. Specifically,

* Created IR/, Transforms/, Linking/, and Utils/ subdirectories and
  moved suitable code inside.
* Created SPIRVEnums.{h|cpp} for SPIR-V C/C++ enums generated from
  SPIR-V spec. Previously they are cluttered inside SPIRVTypes.{h|cpp}.
* Fixed include guards in various header files (both .h and .td).
* Moved serialization tests under test/Target/SPIRV.
* Renamed TableGen backend -gen-spirv-op-utils into -gen-spirv-attr-utils
  as it is only generating utility functions for attributes.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D93407
2020-12-17 11:03:26 -05:00

23 lines
787 B
TableGen

//===-- GPUToSPIRV.td - GPU to SPIR-V Dialect Lowerings ----*- tablegen -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file contains patterns to lower GPU dialect ops to to SPIR-V ops.
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_CONVERSION_GPU_TO_SPIRV
#define MLIR_CONVERSION_GPU_TO_SPIRV
include "mlir/Dialect/GPU/GPUOps.td"
include "mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td"
def : Pat<(GPU_ModuleEndOp), (SPV_ModuleEndOp)>;
#endif // MLIR_CONVERSION_GPU_TO_SPIRV