27static ::mlir::LogicalResult __mlir_ods_local_type_constraint_Ops0(
28 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
29 unsigned valueIndex) {
31 return op->emitOpError(valueKind) <<
" #" << valueIndex
32 <<
" must be a valid LLZK type, but got " << type;
34 return ::mlir::success();
64 return ::mlir::success();
73 return {std::next(getOperation()->operand_begin(), valueRange.first),
74 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
83 return {std::next(getOperation()->result_begin(), valueRange.first),
84 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
88 return ::llvm::cast<::mlir::Value>(*
getODSResults(0).begin());
91void UndefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res) {
92 odsState.addTypes(res);
95void UndefOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
96 assert(resultTypes.size() == 1u &&
"mismatched number of results");
97 odsState.addTypes(resultTypes);
100void UndefOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
101 assert(operands.size() == 0u &&
"mismatched number of parameters");
102 odsState.addOperands(operands);
103 odsState.addAttributes(attributes);
104 assert(resultTypes.size() == 1u &&
"mismatched number of return types");
105 odsState.addTypes(resultTypes);
110 unsigned index = 0; (void)index;
113 for (
auto v : valueGroup0) {
114 if (::mlir::failed(__mlir_ods_local_type_constraint_Ops0(*
this, v.getType(),
"result", index++)))
115 return ::mlir::failure();
118 return ::mlir::success();
125::mlir::ParseResult
UndefOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
126 ::mlir::Type resRawTypes[1];
127 ::llvm::ArrayRef<::mlir::Type> resTypes(resRawTypes);
128 if (parser.parseColon())
129 return ::mlir::failure();
133 if (parser.parseCustomTypeWithFallback(type))
134 return ::mlir::failure();
135 resRawTypes[0] = type;
138 auto loc = parser.getCurrentLocation();(void)loc;
139 if (parser.parseOptionalAttrDict(result.attributes))
140 return ::mlir::failure();
142 result.addTypes(resTypes);
143 return ::mlir::success();
147 _odsPrinter <<
' ' <<
":";
150 auto type =
getRes().getType();
151 if (
auto validType = ::llvm::dyn_cast<::mlir::Type>(type))
152 _odsPrinter.printStrippedAttrOrType(validType);
156 ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
157 _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
160void UndefOp::getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects) {
UndefOpAdaptor(UndefOp op)
::mlir::LogicalResult verify(::mlir::Location loc)
UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getOperands()
void print(::mlir::OpAsmPrinter &_odsPrinter)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::Operation::operand_range getODSOperands(unsigned index)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res)
::mlir::LogicalResult verifyInvariantsImpl()
::mlir::Operation::result_range getODSResults(unsigned index)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
::mlir::DictionaryAttr getAttributes()
::mlir::RegionRange odsRegions
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
UndefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
bool isValidType(Type type)