Lines Matching refs:mlir
28 static bool verifyInType(mlir::Type inType, in verifyInType()
57 static bool verifyRecordLenParams(mlir::Type inType, unsigned numLenParams) { in verifyRecordLenParams()
70 mlir::OpFoldResult fir::AddfOp::fold(llvm::ArrayRef<mlir::Attribute> opnds) { in fold()
71 return mlir::constFoldBinaryOp<FloatAttr>( in fold()
79 mlir::Type fir::AllocaOp::getAllocatedType() { in getAllocatedType()
84 mlir::Type fir::AllocaOp::wrapResultType(mlir::Type intype) { in wrapResultType()
91 mlir::Type fir::AllocaOp::getRefTy(mlir::Type ty) { in getRefTy()
99 mlir::Type fir::AllocMemOp::getAllocatedType() { in getAllocatedType()
103 mlir::Type fir::AllocMemOp::getRefTy(mlir::Type ty) { in getRefTy()
108 mlir::Type fir::AllocMemOp::wrapResultType(mlir::Type intype) { in wrapResultType()
122 mlir::OpFoldResult fir::BoxAddrOp::fold(llvm::ArrayRef<mlir::Attribute> opnds) { in fold()
136 mlir::OpFoldResult
137 fir::BoxCharLenOp::fold(llvm::ArrayRef<mlir::Attribute> opnds) { in fold()
150 mlir::Type fir::BoxDimsOp::getTupleType() { in getTupleType()
152 llvm::SmallVector<mlir::Type, 4> triple{ in getTupleType()
154 return mlir::TupleType::get(triple, getContext()); in getTupleType()
161 static void printCallOp(mlir::OpAsmPrinter &p, fir::CallOp &op) { in printCallOp()
177 static mlir::ParseResult parseCallOp(mlir::OpAsmParser &parser, in parseCallOp()
178 mlir::OperationState &result) { in parseCallOp()
179 llvm::SmallVector<mlir::OpAsmParser::OperandType, 8> operands; in parseCallOp()
181 return mlir::failure(); in parseCallOp()
183 mlir::NamedAttrList attrs; in parseCallOp()
184 mlir::SymbolRefAttr funcAttr; in parseCallOp()
188 return mlir::failure(); in parseCallOp()
191 if (parser.parseOperandList(operands, mlir::OpAsmParser::Delimiter::Paren) || in parseCallOp()
194 return mlir::failure(); in parseCallOp()
196 auto funcType = type.dyn_cast<mlir::FunctionType>(); in parseCallOp()
202 return mlir::failure(); in parseCallOp()
205 llvm::ArrayRef<mlir::OpAsmParser::OperandType>(operands).drop_front(); in parseCallOp()
206 llvm::SmallVector<mlir::Value, 8> resultArgs( in parseCallOp()
212 return mlir::failure(); in parseCallOp()
216 return mlir::success(); in parseCallOp()
224 mlir::CmpFPredicate fir::CmpfOp::getPredicateByName(llvm::StringRef name) { in getPredicateByName()
225 auto pred = mlir::symbolizeCmpFPredicate(name); in getPredicateByName()
242 auto predSym = mlir::symbolizeCmpFPredicate( in printCmpOp()
243 op.template getAttrOfType<mlir::IntegerAttr>(OPTY::getPredicateAttrName()) in printCmpOp()
246 p << '"' << mlir::stringifyCmpFPredicate(predSym.getValue()) << '"' << ", "; in printCmpOp()
258 static mlir::ParseResult parseCmpOp(mlir::OpAsmParser &parser, in parseCmpOp()
259 mlir::OperationState &result) { in parseCmpOp()
260 llvm::SmallVector<mlir::OpAsmParser::OperandType, 2> ops; in parseCmpOp()
261 mlir::NamedAttrList attrs; in parseCmpOp()
262 mlir::Attribute predicateNameAttr; in parseCmpOp()
263 mlir::Type type; in parseCmpOp()
271 if (!predicateNameAttr.isa<mlir::StringAttr>()) in parseCmpOp()
277 predicateNameAttr.cast<mlir::StringAttr>().getValue(); in parseCmpOp()
280 mlir::Type i1Type = builder.getI1Type(); in parseCmpOp()
288 mlir::ParseResult fir::parseCmpfOp(mlir::OpAsmParser &parser, in parseCmpfOp()
289 mlir::OperationState &result) { in parseCmpfOp()
308 mlir::ParseResult fir::parseCmpcOp(mlir::OpAsmParser &parser, in parseCmpcOp()
309 mlir::OperationState &result) { in parseCmpcOp()
317 mlir::OpFoldResult fir::ConvertOp::fold(llvm::ArrayRef<mlir::Attribute> opnds) { in fold()
325 if (inner.getType().isa<mlir::IntegerType>() && (toTy == fromTy)) in fold()
328 if (auto toTy = getType().dyn_cast<mlir::IntegerType>()) in fold()
329 if (auto fromTy = inner.value().getType().dyn_cast<mlir::IntegerType>()) in fold()
337 bool fir::ConvertOp::isIntegerCompatible(mlir::Type ty) { in isIntegerCompatible()
338 return ty.isa<mlir::IntegerType>() || ty.isa<mlir::IndexType>() || in isIntegerCompatible()
343 bool fir::ConvertOp::isFloatCompatible(mlir::Type ty) { in isFloatCompatible()
344 return ty.isa<mlir::FloatType>() || ty.isa<fir::RealType>(); in isFloatCompatible()
347 bool fir::ConvertOp::isPointerCompatible(mlir::Type ty) { in isPointerCompatible()
349 ty.isa<fir::HeapType>() || ty.isa<mlir::MemRefType>() || in isPointerCompatible()
357 static mlir::ParseResult parseCoordinateOp(mlir::OpAsmParser &parser, in parseCoordinateOp()
358 mlir::OperationState &result) { in parseCoordinateOp()
359 llvm::ArrayRef<mlir::Type> allOperandTypes; in parseCoordinateOp()
360 llvm::ArrayRef<mlir::Type> allResultTypes; in parseCoordinateOp()
362 llvm::SmallVector<mlir::OpAsmParser::OperandType, 4> allOperands; in parseCoordinateOp()
370 mlir::FunctionType funcTy; in parseCoordinateOp()
382 mlir::TypeAttr::get(funcTy.getInput(0))); in parseCoordinateOp()
387 mlir::Type fir::CoordinateOp::getBaseType() { in getBaseType()
388 return getAttr(CoordinateOp::baseType()).cast<mlir::TypeAttr>().getValue(); in getBaseType()
392 mlir::Type resType, ValueRange operands, in build()
397 mlir::TypeAttr::get(operands[0].getType())); in build()
403 mlir::Type resType, mlir::Value ref, in build()
405 llvm::SmallVector<mlir::Value, 16> operands{ref}; in build()
414 mlir::FunctionType fir::DispatchOp::getFunctionType() { in getFunctionType()
415 auto attr = getAttr("fn_type").cast<mlir::TypeAttr>(); in getFunctionType()
416 return attr.getValue().cast<mlir::FunctionType>(); in getFunctionType()
423 void fir::DispatchTableOp::appendTableEntry(mlir::Operation *op) { in appendTableEntry()
424 assert(mlir::isa<fir::DTEntryOp>(*op) && "operation must be a DTEntryOp"); in appendTableEntry()
433 static mlir::ParseResult parseEmboxOp(mlir::OpAsmParser &parser, in parseEmboxOp()
434 mlir::OperationState &result) { in parseEmboxOp()
435 mlir::FunctionType type; in parseEmboxOp()
436 llvm::SmallVector<mlir::OpAsmParser::OperandType, 8> operands; in parseEmboxOp()
437 mlir::OpAsmParser::OperandType memref; in parseEmboxOp()
439 return mlir::failure(); in parseEmboxOp()
443 if (parser.parseOperandList(operands, mlir::OpAsmParser::Delimiter::None) || in parseEmboxOp()
445 return mlir::failure(); in parseEmboxOp()
450 mlir::OpAsmParser::OperandType dims; in parseEmboxOp()
452 return mlir::failure(); in parseEmboxOp()
455 mlir::AffineMapAttr map; in parseEmboxOp()
459 return mlir::failure(); in parseEmboxOp()
466 return mlir::failure(); in parseEmboxOp()
467 return mlir::success(); in parseEmboxOp()
475 mlir::TypeAttr inty) { in build()
488 if (mlir::succeeded(parser.parseOptionalKeyword(&linkage))) { in parseGlobalOp()
491 mlir::StringAttr linkAttr = builder.getStringAttr(linkage); in parseGlobalOp()
496 mlir::SymbolRefAttr nameAttr; in parseGlobalOp()
500 result.addAttribute(mlir::SymbolTable::getSymbolAttrName(), in parseGlobalOp()
504 if (mlir::succeeded(parser.parseOptionalLParen())) { in parseGlobalOp()
519 mlir::Type globalType; in parseGlobalOp()
524 mlir::TypeAttr::get(globalType)); in parseGlobalOp()
537 void fir::GlobalOp::appendInitialValue(mlir::Operation *op) { in appendInitialValue()
541 void fir::GlobalOp::build(mlir::OpBuilder &builder, OperationState &result, in build()
546 result.addAttribute(typeAttrName(), mlir::TypeAttr::get(type)); in build()
547 result.addAttribute(mlir::SymbolTable::getSymbolAttrName(), in build()
559 void fir::GlobalOp::build(mlir::OpBuilder &builder, OperationState &result, in build()
565 void fir::GlobalOp::build(mlir::OpBuilder &builder, OperationState &result, in build()
571 void fir::GlobalOp::build(mlir::OpBuilder &builder, OperationState &result, in build()
577 void fir::GlobalOp::build(mlir::OpBuilder &builder, OperationState &result, in build()
583 void fir::GlobalOp::build(mlir::OpBuilder &builder, OperationState &result, in build()
589 mlir::ParseResult fir::GlobalOp::verifyValidLinkage(StringRef linkage) { in verifyValidLinkage()
593 return mlir::success(llvm::is_contained(validNames, linkage)); in verifyValidLinkage()
600 void fir::IterWhileOp::build(mlir::OpBuilder &builder, in build()
601 mlir::OperationState &result, mlir::Value lb, in build()
602 mlir::Value ub, mlir::Value step, in build()
603 mlir::Value iterate, mlir::ValueRange iterArgs, in build()
604 llvm::ArrayRef<mlir::NamedAttribute> attributes) { in build()
610 mlir::Region *bodyRegion = result.addRegion(); in build()
618 static mlir::ParseResult parseIterWhileOp(mlir::OpAsmParser &parser, in parseIterWhileOp()
619 mlir::OperationState &result) { in parseIterWhileOp()
621 mlir::OpAsmParser::OperandType inductionVariable, lb, ub, step; in parseIterWhileOp()
624 return mlir::failure(); in parseIterWhileOp()
636 return mlir::failure(); in parseIterWhileOp()
638 mlir::OpAsmParser::OperandType iterateVar, iterateInput; in parseIterWhileOp()
643 return mlir::failure(); in parseIterWhileOp()
646 llvm::SmallVector<mlir::OpAsmParser::OperandType, 4> regionArgs; in parseIterWhileOp()
652 if (mlir::succeeded(parser.parseOptionalKeyword("iter_args"))) { in parseIterWhileOp()
653 llvm::SmallVector<mlir::OpAsmParser::OperandType, 4> operands; in parseIterWhileOp()
654 llvm::SmallVector<mlir::Type, 4> regionTypes; in parseIterWhileOp()
658 return mlir::failure(); in parseIterWhileOp()
663 return mlir::failure(); in parseIterWhileOp()
668 return mlir::failure(); in parseIterWhileOp()
670 llvm::SmallVector<mlir::Type, 4> argTypes; in parseIterWhileOp()
687 return mlir::success(); in parseIterWhileOp()
690 static mlir::LogicalResult verify(fir::IterWhileOp op) { in verify()
709 return mlir::failure(); in verify()
730 return mlir::success(); in verify()
733 static void print(mlir::OpAsmPrinter &p, fir::IterWhileOp op) { in print()
753 mlir::Region &fir::IterWhileOp::getLoopBody() { return region(); } in getLoopBody()
755 bool fir::IterWhileOp::isDefinedOutsideOfLoop(mlir::Value value) { in isDefinedOutsideOfLoop()
759 mlir::LogicalResult
760 fir::IterWhileOp::moveOutOfLoop(llvm::ArrayRef<mlir::Operation *> ops) { in moveOutOfLoop()
771 static mlir::Type elementTypeOf(mlir::Type ref) { in elementTypeOf()
772 return llvm::TypeSwitch<mlir::Type, mlir::Type>(ref) in elementTypeOf()
775 .Default([](mlir::Type) { return mlir::Type{}; }); in elementTypeOf()
778 mlir::ParseResult fir::LoadOp::getElementOf(mlir::Type &ele, mlir::Type ref) { in getElementOf()
780 return mlir::success(); in getElementOf()
781 return mlir::failure(); in getElementOf()
788 void fir::LoopOp::build(mlir::OpBuilder &builder, mlir::OperationState &result, in build()
789 mlir::Value lb, mlir::Value ub, mlir::Value step, in build()
790 bool unordered, mlir::ValueRange iterArgs, in build()
791 llvm::ArrayRef<mlir::NamedAttribute> attributes) { in build()
796 mlir::Region *bodyRegion = result.addRegion(); in build()
807 static mlir::ParseResult parseLoopOp(mlir::OpAsmParser &parser, in parseLoopOp()
808 mlir::OperationState &result) { in parseLoopOp()
810 mlir::OpAsmParser::OperandType inductionVariable, lb, ub, step; in parseLoopOp()
813 return mlir::failure(); in parseLoopOp()
825 if (mlir::succeeded(parser.parseOptionalKeyword("unordered"))) in parseLoopOp()
830 llvm::SmallVector<mlir::OpAsmParser::OperandType, 4> regionArgs, operands; in parseLoopOp()
831 llvm::SmallVector<mlir::Type, 4> argTypes; in parseLoopOp()
847 return mlir::failure(); in parseLoopOp()
865 return mlir::success(); in parseLoopOp()
868 fir::LoopOp fir::getForInductionVarOwner(mlir::Value val) { in getForInductionVarOwner()
869 auto ivArg = val.dyn_cast<mlir::BlockArgument>(); in getForInductionVarOwner()
878 static mlir::LogicalResult verify(fir::LoopOp op) { in verify()
917 static void print(mlir::OpAsmPrinter &p, fir::LoopOp op) { in print()
939 mlir::Region &fir::LoopOp::getLoopBody() { return region(); } in getLoopBody()
941 bool fir::LoopOp::isDefinedOutsideOfLoop(mlir::Value value) { in isDefinedOutsideOfLoop()
945 mlir::LogicalResult
946 fir::LoopOp::moveOutOfLoop(llvm::ArrayRef<mlir::Operation *> ops) { in moveOutOfLoop()
956 mlir::OpFoldResult fir::MulfOp::fold(llvm::ArrayRef<mlir::Attribute> opnds) { in fold()
957 return mlir::constFoldBinaryOp<FloatAttr>( in fold()
965 static mlir::LogicalResult verify(fir::ResultOp op) { in verify()
993 mlir::DenseIntElementsAttr ranges, in getSubOperands()
1002 static mlir::MutableOperandRange
1003 getMutableSuccessorOperands(unsigned pos, mlir::MutableOperandRange operands, in getMutableSuccessorOperands()
1010 mlir::MutableOperandRange::OperandSegment(pos, targetOffsetAttr)); in getMutableSuccessorOperands()
1013 static unsigned denseElementsSize(mlir::DenseIntElementsAttr attr) { in denseElementsSize()
1017 llvm::Optional<mlir::OperandRange> fir::SelectOp::getCompareOperands(unsigned) { in getCompareOperands()
1021 llvm::Optional<llvm::ArrayRef<mlir::Value>>
1022 fir::SelectOp::getCompareOperands(llvm::ArrayRef<mlir::Value>, unsigned) { in getCompareOperands()
1026 llvm::Optional<mlir::MutableOperandRange>
1032 llvm::Optional<llvm::ArrayRef<mlir::Value>>
1033 fir::SelectOp::getSuccessorOperands(llvm::ArrayRef<mlir::Value> operands, in getSuccessorOperands()
1035 auto a = getAttrOfType<mlir::DenseIntElementsAttr>(getTargetOffsetAttr()); in getSuccessorOperands()
1037 getAttrOfType<mlir::DenseIntElementsAttr>(getOperandSegmentSizeAttr()); in getSuccessorOperands()
1043 getAttrOfType<mlir::DenseIntElementsAttr>(getTargetOffsetAttr())); in targetOffsetSize()
1050 llvm::Optional<mlir::OperandRange>
1052 auto a = getAttrOfType<mlir::DenseIntElementsAttr>(getCompareOffsetAttr()); in getCompareOperands()
1056 llvm::Optional<llvm::ArrayRef<mlir::Value>>
1057 fir::SelectCaseOp::getCompareOperands(llvm::ArrayRef<mlir::Value> operands, in getCompareOperands()
1059 auto a = getAttrOfType<mlir::DenseIntElementsAttr>(getCompareOffsetAttr()); in getCompareOperands()
1061 getAttrOfType<mlir::DenseIntElementsAttr>(getOperandSegmentSizeAttr()); in getCompareOperands()
1065 llvm::Optional<mlir::MutableOperandRange>
1071 llvm::Optional<llvm::ArrayRef<mlir::Value>>
1072 fir::SelectCaseOp::getSuccessorOperands(llvm::ArrayRef<mlir::Value> operands, in getSuccessorOperands()
1074 auto a = getAttrOfType<mlir::DenseIntElementsAttr>(getTargetOffsetAttr()); in getSuccessorOperands()
1076 getAttrOfType<mlir::DenseIntElementsAttr>(getOperandSegmentSizeAttr()); in getSuccessorOperands()
1081 static mlir::ParseResult parseSelectCase(mlir::OpAsmParser &parser, in parseSelectCase()
1082 mlir::OperationState &result) { in parseSelectCase()
1083 mlir::OpAsmParser::OperandType selector; in parseSelectCase()
1084 mlir::Type type; in parseSelectCase()
1086 return mlir::failure(); in parseSelectCase()
1088 llvm::SmallVector<mlir::Attribute, 8> attrs; in parseSelectCase()
1089 llvm::SmallVector<mlir::OpAsmParser::OperandType, 8> opers; in parseSelectCase()
1090 llvm::SmallVector<mlir::Block *, 8> dests; in parseSelectCase()
1091 llvm::SmallVector<llvm::SmallVector<mlir::Value, 8>, 8> destArgs; in parseSelectCase()
1095 mlir::Attribute attr; in parseSelectCase()
1096 mlir::Block *dest; in parseSelectCase()
1097 llvm::SmallVector<mlir::Value, 8> destArg; in parseSelectCase()
1098 mlir::NamedAttrList temp; in parseSelectCase()
1101 return mlir::failure(); in parseSelectCase()
1103 if (attr.dyn_cast_or_null<mlir::UnitAttr>()) { in parseSelectCase()
1106 mlir::OpAsmParser::OperandType oper1; in parseSelectCase()
1107 mlir::OpAsmParser::OperandType oper2; in parseSelectCase()
1110 return mlir::failure(); in parseSelectCase()
1116 mlir::OpAsmParser::OperandType oper; in parseSelectCase()
1118 return mlir::failure(); in parseSelectCase()
1124 return mlir::failure(); in parseSelectCase()
1130 return mlir::failure(); in parseSelectCase()
1135 return mlir::failure(); in parseSelectCase()
1151 return mlir::success(); in parseSelectCase()
1156 getAttrOfType<mlir::DenseIntElementsAttr>(getCompareOffsetAttr())); in compareOffsetSize()
1161 getAttrOfType<mlir::DenseIntElementsAttr>(getTargetOffsetAttr())); in targetOffsetSize()
1164 void fir::SelectCaseOp::build(mlir::OpBuilder &builder, in build()
1165 mlir::OperationState &result, in build()
1166 mlir::Value selector, in build()
1167 llvm::ArrayRef<mlir::Attribute> compareAttrs, in build()
1168 llvm::ArrayRef<mlir::ValueRange> cmpOperands, in build()
1169 llvm::ArrayRef<mlir::Block *> destinations, in build()
1170 llvm::ArrayRef<mlir::ValueRange> destOperands, in build()
1171 llvm::ArrayRef<mlir::NamedAttribute> attributes) { in build()
1180 } else if (attr.isa<mlir::UnitAttr>()) { in build()
1217 void fir::SelectCaseOp::build(mlir::OpBuilder &builder, in build()
1218 mlir::OperationState &result, in build()
1219 mlir::Value selector, in build()
1220 llvm::ArrayRef<mlir::Attribute> compareAttrs, in build()
1221 llvm::ArrayRef<mlir::Value> cmpOpList, in build()
1222 llvm::ArrayRef<mlir::Block *> destinations, in build()
1223 llvm::ArrayRef<mlir::ValueRange> destOperands, in build()
1224 llvm::ArrayRef<mlir::NamedAttribute> attributes) { in build()
1225 llvm::SmallVector<mlir::ValueRange, 16> cmpOpers; in build()
1229 cmpOpers.push_back(mlir::ValueRange({iter, iter + 2})); in build()
1232 cmpOpers.push_back(mlir::ValueRange{}); in build()
1234 cmpOpers.push_back(mlir::ValueRange({iter, iter + 1})); in build()
1246 llvm::Optional<mlir::OperandRange>
1251 llvm::Optional<llvm::ArrayRef<mlir::Value>>
1252 fir::SelectRankOp::getCompareOperands(llvm::ArrayRef<mlir::Value>, unsigned) { in getCompareOperands()
1256 llvm::Optional<mlir::MutableOperandRange>
1262 llvm::Optional<llvm::ArrayRef<mlir::Value>>
1263 fir::SelectRankOp::getSuccessorOperands(llvm::ArrayRef<mlir::Value> operands, in getSuccessorOperands()
1265 auto a = getAttrOfType<mlir::DenseIntElementsAttr>(getTargetOffsetAttr()); in getSuccessorOperands()
1267 getAttrOfType<mlir::DenseIntElementsAttr>(getOperandSegmentSizeAttr()); in getSuccessorOperands()
1273 getAttrOfType<mlir::DenseIntElementsAttr>(getTargetOffsetAttr())); in targetOffsetSize()
1280 llvm::Optional<mlir::OperandRange>
1285 llvm::Optional<llvm::ArrayRef<mlir::Value>>
1286 fir::SelectTypeOp::getCompareOperands(llvm::ArrayRef<mlir::Value>, unsigned) { in getCompareOperands()
1290 llvm::Optional<mlir::MutableOperandRange>
1296 llvm::Optional<llvm::ArrayRef<mlir::Value>>
1297 fir::SelectTypeOp::getSuccessorOperands(llvm::ArrayRef<mlir::Value> operands, in getSuccessorOperands()
1299 auto a = getAttrOfType<mlir::DenseIntElementsAttr>(getTargetOffsetAttr()); in getSuccessorOperands()
1301 getAttrOfType<mlir::DenseIntElementsAttr>(getOperandSegmentSizeAttr()); in getSuccessorOperands()
1307 mlir::OpAsmParser::OperandType selector; in parseSelectType()
1308 mlir::Type type; in parseSelectType()
1310 return mlir::failure(); in parseSelectType()
1312 llvm::SmallVector<mlir::Attribute, 8> attrs; in parseSelectType()
1313 llvm::SmallVector<mlir::Block *, 8> dests; in parseSelectType()
1314 llvm::SmallVector<llvm::SmallVector<mlir::Value, 8>, 8> destArgs; in parseSelectType()
1316 mlir::Attribute attr; in parseSelectType()
1317 mlir::Block *dest; in parseSelectType()
1318 llvm::SmallVector<mlir::Value, 8> destArg; in parseSelectType()
1319 mlir::NamedAttrList temp; in parseSelectType()
1322 return mlir::failure(); in parseSelectType()
1329 return mlir::failure(); in parseSelectType()
1347 return mlir::success(); in parseSelectType()
1352 getAttrOfType<mlir::DenseIntElementsAttr>(getTargetOffsetAttr())); in targetOffsetSize()
1359 mlir::Type fir::StoreOp::elementType(mlir::Type refType) { in elementType()
1382 mlir::OpFoldResult fir::SubfOp::fold(llvm::ArrayRef<mlir::Attribute> opnds) { in fold()
1383 return mlir::constFoldBinaryOp<FloatAttr>( in fold()
1390 void fir::WhereOp::build(mlir::OpBuilder &builder, OperationState &result, in build()
1391 mlir::Value cond, bool withElseRegion) { in build()
1395 void fir::WhereOp::build(mlir::OpBuilder &builder, OperationState &result, in build()
1396 mlir::TypeRange resultTypes, mlir::Value cond, in build()
1401 mlir::Region *thenRegion = result.addRegion(); in build()
1402 thenRegion->push_back(new mlir::Block()); in build()
1406 mlir::Region *elseRegion = result.addRegion(); in build()
1408 elseRegion->push_back(new mlir::Block()); in build()
1414 static mlir::ParseResult parseWhereOp(OpAsmParser &parser, in parseWhereOp()
1417 mlir::Region *thenRegion = result.addRegion(); in parseWhereOp()
1418 mlir::Region *elseRegion = result.addRegion(); in parseWhereOp()
1422 mlir::Type i1Type = builder.getIntegerType(1); in parseWhereOp()
1425 return mlir::failure(); in parseWhereOp()
1428 return mlir::failure(); in parseWhereOp()
1434 return mlir::failure(); in parseWhereOp()
1441 return mlir::failure(); in parseWhereOp()
1443 return mlir::success(); in parseWhereOp()
1450 return mlir::success(); in verify()
1453 static void print(mlir::OpAsmPrinter &p, fir::WhereOp op) { in print()
1475 mlir::ParseResult fir::isValidCaseAttr(mlir::Attribute attr) { in isValidCaseAttr()
1476 if (attr.dyn_cast_or_null<mlir::UnitAttr>() || in isValidCaseAttr()
1481 return mlir::success(); in isValidCaseAttr()
1482 return mlir::failure(); in isValidCaseAttr()
1485 unsigned fir::getCaseArgumentOffset(llvm::ArrayRef<mlir::Attribute> cases, in getCaseArgumentOffset()
1490 if (!attr.dyn_cast_or_null<mlir::UnitAttr>()) { in getCaseArgumentOffset()
1499 mlir::ParseResult fir::parseSelector(mlir::OpAsmParser &parser, in parseSelector()
1500 mlir::OperationState &result, in parseSelector()
1501 mlir::OpAsmParser::OperandType &selector, in parseSelector()
1502 mlir::Type &type) { in parseSelector()
1506 return mlir::failure(); in parseSelector()
1507 return mlir::success(); in parseSelector()
1530 bool fir::isReferenceLike(mlir::Type type) { in isReferenceLike()
1535 mlir::FuncOp fir::createFuncOp(mlir::Location loc, mlir::ModuleOp module, in createFuncOp()
1536 StringRef name, mlir::FunctionType type, in createFuncOp()
1537 llvm::ArrayRef<mlir::NamedAttribute> attrs) { in createFuncOp()
1538 if (auto f = module.lookupSymbol<mlir::FuncOp>(name)) in createFuncOp()
1540 mlir::OpBuilder modBuilder(module.getBodyRegion()); in createFuncOp()
1542 return modBuilder.create<mlir::FuncOp>(loc, name, type, attrs); in createFuncOp()
1545 fir::GlobalOp fir::createGlobalOp(mlir::Location loc, mlir::ModuleOp module, in createGlobalOp()
1546 StringRef name, mlir::Type type, in createGlobalOp()
1547 llvm::ArrayRef<mlir::NamedAttribute> attrs) { in createGlobalOp()
1550 mlir::OpBuilder modBuilder(module.getBodyRegion()); in createGlobalOp()