MLIR 22.0.0git
SPIRVOpTraits.h
Go to the documentation of this file.
1//===- SPIRVOps.h - MLIR SPIR-V operation traits ----------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file declares C++ classes for some of operation traits in the SPIR-V
10// dialect.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MLIR_DIALECT_SPIRV_IR_SPIRVOPTRAITS_H_
15#define MLIR_DIALECT_SPIRV_IR_SPIRVOPTRAITS_H_
16
18
19namespace mlir {
20namespace OpTrait {
21namespace spirv {
22
23template <typename ConcreteType>
24class UnsignedOp : public TraitBase<ConcreteType, UnsignedOp> {};
25
26template <typename ConcreteType>
27class SignedOp : public TraitBase<ConcreteType, SignedOp> {};
28
29/// A trait to mark ops that can be enclosed/wrapped in a
30/// `SpecConstantOperation` op.
31template <typename ConcreteType>
33 : public TraitBase<ConcreteType, UsableInSpecConstantOp> {};
34
35} // namespace spirv
36} // namespace OpTrait
37} // namespace mlir
38
39#endif // MLIR_DIALECT_SPIRV_IR_SPIRVOPTRAITS_H_
Helper class for implementing traits.
A trait to mark ops that can be enclosed/wrapped in a SpecConstantOperation op.
Include the generated interface declarations.