MLIR  20.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 
17 #include "mlir/IR/OpDefinition.h"
18 
19 namespace mlir {
20 namespace OpTrait {
21 namespace spirv {
22 
23 template <typename ConcreteType>
24 class UnsignedOp : public TraitBase<ConcreteType, UnsignedOp> {};
25 
26 template <typename ConcreteType>
27 class SignedOp : public TraitBase<ConcreteType, SignedOp> {};
28 
29 /// A trait to mark ops that can be enclosed/wrapped in a
30 /// `SpecConstantOperation` op.
31 template <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.
Definition: OpDefinition.h:373
A trait to mark ops that can be enclosed/wrapped in a SpecConstantOperation op.
Definition: SPIRVOpTraits.h:33
Include the generated interface declarations.