Skip to content

Commit 10abc3f

Browse files
add static on FoldCopyOfCast.
1 parent 63ccf0a commit 10abc3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ void CopyOp::getCanonicalizationPatterns(RewritePatternSet &results,
758758
/// If the source/target of a CopyOp is a CastOp that does not modify the shape
759759
/// and element type, the cast can be skipped. Such CastOps only cast the layout
760760
/// of the type.
761-
LogicalResult FoldCopyOfCast(CopyOp op) {
761+
static LogicalResult FoldCopyOfCast(CopyOp op) {
762762
for (OpOperand &operand : op->getOpOperands()) {
763763
auto castOp = operand.get().getDefiningOp<memref::CastOp>();
764764
if (castOp && memref::CastOp::canFoldIntoConsumerOp(castOp)) {

0 commit comments

Comments
 (0)