36 mlir::OpBuilder &builder, mlir::Attribute value, mlir::Type type, mlir::Location loc
40 if (llvm::isa<mlir::IntegerAttr>(value) && llvm::isa<mlir::IntegerType>(type) &&
41 llvm::cast<mlir::IntegerType>(type).isInteger(1)) {
42 return builder.create<mlir::arith::ConstantOp>(loc, llvm::cast<mlir::IntegerAttr>(value));
::mlir::Operation * materializeConstant(::mlir::OpBuilder &builder, ::mlir::Attribute value, ::mlir::Type type, ::mlir::Location loc) override
Materialize a single constant operation from a given attribute value with the desired resultant type.