1//===- EmitC.h - EmitC Dialect ----------------------------------*- 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 EmitC in MLIR.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_DIALECT_EMITC_IR_EMITC_H
14#define MLIR_DIALECT_EMITC_IR_EMITC_H
15
16#include "mlir/Bytecode/BytecodeOpInterface.h"
17#include "mlir/Dialect/EmitC/IR/EmitCTraits.h"
18#include "mlir/IR/Builders.h"
19#include "mlir/IR/BuiltinOps.h"
20#include "mlir/IR/BuiltinTypes.h"
21#include "mlir/IR/Dialect.h"
22#include "mlir/Interfaces/CastInterfaces.h"
23#include "mlir/Interfaces/ControlFlowInterfaces.h"
24#include "mlir/Interfaces/FunctionInterfaces.h"
25#include "mlir/Interfaces/SideEffectInterfaces.h"
26
27#include "mlir/Dialect/EmitC/IR/EmitCDialect.h.inc"
28#include "mlir/Dialect/EmitC/IR/EmitCEnums.h.inc"
29
30namespace mlir {
31namespace emitc {
32void buildTerminatedBody(OpBuilder &builder, Location loc);
33
34/// Determines whether \p type is valid in EmitC.
35bool isSupportedEmitCType(mlir::Type type);
36
37/// Determines whether \p type is a valid integer type in EmitC.
38bool isSupportedIntegerType(mlir::Type type);
39
40/// Determines whether \p type is integer like, i.e. it's a supported integer,
41/// an index or opaque type.
42bool isIntegerIndexOrOpaqueType(Type type);
43
44/// Determines whether \p type is a valid floating-point type in EmitC.
45bool isSupportedFloatType(mlir::Type type);
46} // namespace emitc
47} // namespace mlir
48
49#define GET_ATTRDEF_CLASSES
50#include "mlir/Dialect/EmitC/IR/EmitCAttributes.h.inc"
51
52#define GET_TYPEDEF_CLASSES
53#include "mlir/Dialect/EmitC/IR/EmitCTypes.h.inc"
54
55#define GET_OP_CLASSES
56#include "mlir/Dialect/EmitC/IR/EmitC.h.inc"
57
58#endif // MLIR_DIALECT_EMITC_IR_EMITC_H
59

source code of mlir/include/mlir/Dialect/EmitC/IR/EmitC.h