Lines Matching refs:CastOp
92 auto cast = operand.get().getDefiningOp<CastOp>(); in foldMemRefCast()
208 rewriter.create<CastOp>(alloc.getLoc(), alloc.getType(), newAlloc); in matchAndRewrite()
516 bool CastOp::canFoldIntoConsumerOp(CastOp castOp) { in canFoldIntoConsumerOp()
565 bool CastOp::areCastCompatible(TypeRange inputs, TypeRange outputs) { in areCastCompatible()
635 OpFoldResult CastOp::fold(ArrayRef<Attribute> operands) { in fold()
655 if (auto castOp = copyOp.getSource().getDefiningOp<CastOp>()) { in matchAndRewrite()
671 if (auto castOp = copyOp.getTarget().getDefiningOp<CastOp>()) { in matchAndRewrite()
716 auto castOp = operand.get().getDefiningOp<memref::CastOp>(); in fold()
717 if (castOp && memref::CastOp::canFoldIntoConsumerOp(castOp)) { in fold()
1581 if (auto prev = src.getDefiningOp<CastOp>()) in fold()
1991 auto cast = op.getOperand().getDefiningOp<CastOp>(); in matchAndRewrite()
1995 if (!CastOp::canFoldIntoConsumerOp(cast)) in matchAndRewrite()
2008 rewriter.replaceOpWithNewOp<CastOp>(op, op.getType(), newOp); in matchAndRewrite()
2542 auto castOp = subViewOp.getSource().getDefiningOp<CastOp>(); in matchAndRewrite()
2546 if (!CastOp::canFoldIntoConsumerOp(castOp)) in matchAndRewrite()
2566 rewriter.replaceOpWithNewOp<CastOp>(subViewOp, subViewOp.getType(), in matchAndRewrite()
2586 rewriter.replaceOpWithNewOp<CastOp>(subViewOp, subViewOp.getType(), in matchAndRewrite()
2607 rewriter.replaceOpWithNewOp<CastOp>(op, op.getType(), newOp); in operator ()()
2817 rewriter.replaceOpWithNewOp<CastOp>(viewOp, viewOp.getType(), newViewOp); in matchAndRewrite()
2828 CastOp memrefCastOp = memrefOperand.getDefiningOp<CastOp>(); in matchAndRewrite()