================ @@ -16,4 +16,50 @@ include "clang/CIR/Dialect/IR/CIRDialect.td" +include "mlir/Interfaces/ControlFlowInterfaces.td" +include "mlir/Interfaces/FunctionInterfaces.td" +include "mlir/Interfaces/InferTypeOpInterface.td" +include "mlir/Interfaces/LoopLikeInterface.td" +include "mlir/Interfaces/MemorySlotInterfaces.td" +include "mlir/Interfaces/SideEffectInterfaces.td" + +include "mlir/IR/BuiltinAttributeInterfaces.td" +include "mlir/IR/EnumAttr.td" +include "mlir/IR/SymbolInterfaces.td" +include "mlir/IR/CommonAttrConstraints.td" + +//===----------------------------------------------------------------------===// +// CIR Ops +//===----------------------------------------------------------------------===// + +class LLVMLoweringInfo { + string llvmOp = ""; +} + +class CIR_Op<string mnemonic, list<Trait> traits = []> : + Op<CIR_Dialect, mnemonic, traits>, LLVMLoweringInfo; + +//===----------------------------------------------------------------------===// +// FuncOp +//===----------------------------------------------------------------------===// + +// For starters, cir.func has only name, nothing else. The other properties +// of a function will be added over time as more of ClangIR is upstreamed. + +def FuncOp : CIR_Op<"func"> { ---------------- SchrodingerZhu wrote:
Maybe mention that some traits are to be added https://github.com/llvm/llvm-project/pull/113483 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits