| 1 | //===- CIRDialect.h - CIR 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 the CIR dialect. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H |
| 14 | #define LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H |
| 15 | |
| 16 | #include "mlir/IR/Builders.h" |
| 17 | #include "mlir/IR/BuiltinOps.h" |
| 18 | #include "mlir/IR/BuiltinTypes.h" |
| 19 | #include "mlir/IR/Dialect.h" |
| 20 | #include "mlir/IR/OpDefinition.h" |
| 21 | #include "mlir/Interfaces/CallInterfaces.h" |
| 22 | #include "mlir/Interfaces/ControlFlowInterfaces.h" |
| 23 | #include "mlir/Interfaces/FunctionInterfaces.h" |
| 24 | #include "mlir/Interfaces/InferTypeOpInterface.h" |
| 25 | #include "mlir/Interfaces/LoopLikeInterface.h" |
| 26 | #include "mlir/Interfaces/MemorySlotInterfaces.h" |
| 27 | #include "mlir/Interfaces/SideEffectInterfaces.h" |
| 28 | |
| 29 | #include "clang/CIR/Dialect/IR/CIRAttrs.h" |
| 30 | #include "clang/CIR/Dialect/IR/CIROpsDialect.h.inc" |
| 31 | #include "clang/CIR/Dialect/IR/CIROpsEnums.h" |
| 32 | #include "clang/CIR/Dialect/IR/CIRTypes.h" |
| 33 | #include "clang/CIR/Interfaces/CIRLoopOpInterface.h" |
| 34 | #include "clang/CIR/Interfaces/CIROpInterfaces.h" |
| 35 | #include "clang/CIR/MissingFeatures.h" |
| 36 | |
| 37 | using BuilderCallbackRef = |
| 38 | llvm::function_ref<void(mlir::OpBuilder &, mlir::Location)>; |
| 39 | using BuilderOpStateCallbackRef = llvm::function_ref<void( |
| 40 | mlir::OpBuilder &, mlir::Location, mlir::OperationState &)>; |
| 41 | |
| 42 | namespace cir { |
| 43 | void buildTerminatedBody(mlir::OpBuilder &builder, mlir::Location loc); |
| 44 | } // namespace cir |
| 45 | |
| 46 | // TableGen'erated files for MLIR dialects require that a macro be defined when |
| 47 | // they are included. GET_OP_CLASSES tells the file to define the classes for |
| 48 | // the operations of that dialect. |
| 49 | #define GET_OP_CLASSES |
| 50 | #include "clang/CIR/Dialect/IR/CIROps.h.inc" |
| 51 | |
| 52 | #endif // LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H |
| 53 | |