15#ifndef CLANG_LIB_CIR_DIALECT_IR_CIROPDEFINITIONS_H
16#define CLANG_LIB_CIR_DIALECT_IR_CIROPDEFINITIONS_H
20#include "mlir/IR/OpImplementation.h"
25 mlir::Region ®ion);
27 mlir::Region ®ion);
29mlir::OptionalParseResult
31 mlir::ptr::MemorySpaceAttrInterface &attr);
33 mlir::ptr::MemorySpaceAttrInterface attr);
36 mlir::OpAsmParser &p, cir::AssumeBundleKindAttr &bundleKindAttr,
40 cir::AssumeBundleKindAttr kindAttr,
41 mlir::OperandRange bundleArgs,
42 mlir::TypeRange bundleArgTypes);
45 mlir::OpAsmParser &parser, mlir::Type &flagType,
51 mlir::Type flagType, mlir::SuccessorRange succs,
52 mlir::OperandRangeRange succOperands,
53 const mlir::TypeRangeRange &succOperandsTypes);
56 mlir::OpAsmParser &parser, mlir::Type flagType, mlir::ArrayAttr &caseValues,
62 mlir::Type flagType, mlir::ArrayAttr caseValues,
63 mlir::SuccessorRange caseDestinations,
64 mlir::OperandRangeRange caseOperands,
65 const mlir::TypeRangeRange &caseOperandTypes);
68 mlir::StringAttr &comdatAttr);
70 mlir::StringAttr comdat);
73 mlir::OpAsmParser &parser, mlir::TypeAttr &typeAttr,
74 mlir::Attribute &initialValueAttr, mlir::Region &ctorRegion,
75 mlir::Region &dtorRegion);
78 mlir::Attribute initAttr,
79 mlir::Region &ctorRegion,
80 mlir::Region &dtorRegion);
82mlir::ParseResult
parseCopyTypes(mlir::OpAsmParser &parser, mlir::Type &srcType,
85 mlir::Type srcType, mlir::Type dstType);
88 mlir::OpAsmParser &parser,
90 mlir::ArrayAttr &handlerTypes);
92 mlir::MutableArrayRef<mlir::Region> handlerRegions,
93 mlir::ArrayAttr handlerTypes);
96 mlir::OpAsmParser &parser, mlir::ArrayAttr &catchTypes,
98 mlir::Block *&defaultDestination, mlir::UnitAttr &defaultIsCatchAll);
100 mlir::ArrayAttr catchTypes,
101 mlir::SuccessorRange catchDestinations,
102 mlir::Block *defaultDestination,
103 mlir::UnitAttr defaultIsCatchAll);
mlir::ParseResult parseEhDispatchDestinations(mlir::OpAsmParser &parser, mlir::ArrayAttr &catchTypes, llvm::SmallVectorImpl< mlir::Block * > &catchDestinations, mlir::Block *&defaultDestination, mlir::UnitAttr &defaultIsCatchAll)
mlir::ParseResult parseOmittedTerminatorRegion(mlir::OpAsmParser &parser, mlir::Region ®ion)
void printCopyTypes(mlir::OpAsmPrinter &printer, mlir::Operation *, mlir::Type srcType, mlir::Type dstType)
mlir::ParseResult parseCopyTypes(mlir::OpAsmParser &parser, mlir::Type &srcType, mlir::Type &dstType)
void printComdatName(mlir::OpAsmPrinter &p, cir::GlobalOp op, mlir::StringAttr comdat)
mlir::ParseResult parseGlobalOpTypeAndInitialValue(mlir::OpAsmParser &parser, mlir::TypeAttr &typeAttr, mlir::Attribute &initialValueAttr, mlir::Region &ctorRegion, mlir::Region &dtorRegion)
mlir::ParseResult parseSwitchFlatOpCases(mlir::OpAsmParser &parser, mlir::Type flagType, mlir::ArrayAttr &caseValues, llvm::SmallVectorImpl< mlir::Block * > &caseDestinations, llvm::SmallVectorImpl< llvm::SmallVector< mlir::OpAsmParser::UnresolvedOperand > > &caseOperands, llvm::SmallVectorImpl< llvm::SmallVector< mlir::Type > > &caseOperandTypes)
mlir::ParseResult parseAssumeBundle(mlir::OpAsmParser &p, cir::AssumeBundleKindAttr &bundleKindAttr, llvm::SmallVector< mlir::OpAsmParser::UnresolvedOperand, 4 > &bundleArgs, llvm::SmallVector< mlir::Type, 1 > &bundleArgTypes)
mlir::ParseResult parseComdatName(mlir::OpAsmParser &parser, mlir::StringAttr &comdatAttr)
mlir::OptionalParseResult parseGlobalMemorySpace(mlir::AsmParser &p, mlir::ptr::MemorySpaceAttrInterface &attr)
void printOmittedTerminatorRegion(mlir::OpAsmPrinter &printer, cir::ScopeOp &op, mlir::Region ®ion)
void printTryHandlerRegions(mlir::OpAsmPrinter &printer, cir::TryOp op, mlir::MutableArrayRef< mlir::Region > handlerRegions, mlir::ArrayAttr handlerTypes)
void printIndirectBrOpSucessors(mlir::OpAsmPrinter &p, cir::IndirectBrOp op, mlir::Type flagType, mlir::SuccessorRange succs, mlir::OperandRangeRange succOperands, const mlir::TypeRangeRange &succOperandsTypes)
mlir::ParseResult parseTryHandlerRegions(mlir::OpAsmParser &parser, llvm::SmallVectorImpl< std::unique_ptr< mlir::Region > > &handlerRegions, mlir::ArrayAttr &handlerTypes)
void printGlobalMemorySpace(mlir::AsmPrinter &printer, cir::GlobalOp op, mlir::ptr::MemorySpaceAttrInterface attr)
mlir::ParseResult parseIndirectBrOpSucessors(mlir::OpAsmParser &parser, mlir::Type &flagType, llvm::SmallVectorImpl< mlir::Block * > &succOperandBlocks, llvm::SmallVectorImpl< llvm::SmallVector< mlir::OpAsmParser::UnresolvedOperand > > &succOperands, llvm::SmallVectorImpl< llvm::SmallVector< mlir::Type > > &succOperandsTypes)
void printGlobalOpTypeAndInitialValue(mlir::OpAsmPrinter &p, cir::GlobalOp op, mlir::TypeAttr type, mlir::Attribute initAttr, mlir::Region &ctorRegion, mlir::Region &dtorRegion)
void printEhDispatchDestinations(mlir::OpAsmPrinter &p, cir::EhDispatchOp op, mlir::ArrayAttr catchTypes, mlir::SuccessorRange catchDestinations, mlir::Block *defaultDestination, mlir::UnitAttr defaultIsCatchAll)
void printAssumeBundle(mlir::OpAsmPrinter &p, cir::AssumeOp op, cir::AssumeBundleKindAttr kindAttr, mlir::OperandRange bundleArgs, mlir::TypeRange bundleArgTypes)
void printSwitchFlatOpCases(mlir::OpAsmPrinter &p, cir::SwitchFlatOp op, mlir::Type flagType, mlir::ArrayAttr caseValues, mlir::SuccessorRange caseDestinations, mlir::OperandRangeRange caseOperands, const mlir::TypeRangeRange &caseOperandTypes)