================ @@ -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"> { ---------------- dkolsen-pgi wrote:
That's exactly what the comment says, "The other properties of a function will be added over time." I'm still trying to find the right balance for comments explaining what has not yet been implemented (or upstreamed in this case). Too many such comments is just clutter and gets in the way. Too few is not helpful. 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