diff --git a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h --- a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h +++ b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h @@ -400,6 +400,12 @@ #include "mlir/Dialect/Affine/IR/AffineOps.h.inc" namespace mlir { +/// Verify common indexing invariants of affine.load, affine.store, +/// affine.vector_load and affine.vector_store. +LogicalResult verifyMemoryOpIndexing(Operation *op, AffineMapAttr mapAttr, + Operation::operand_range mapOperands, + MemRefType memrefType, + unsigned numIndexOperands); /// Returns true if the provided value is the induction variable of a /// AffineForOp. bool isForInductionVar(Value val); diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp --- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp +++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp @@ -2401,10 +2401,10 @@ /// Verify common indexing invariants of affine.load, affine.store, /// affine.vector_load and affine.vector_store. -static LogicalResult -verifyMemoryOpIndexing(Operation *op, AffineMapAttr mapAttr, - Operation::operand_range mapOperands, - MemRefType memrefType, unsigned numIndexOperands) { +LogicalResult mlir::verifyMemoryOpIndexing(Operation *op, AffineMapAttr mapAttr, + Operation::operand_range mapOperands, + MemRefType memrefType, + unsigned numIndexOperands) { if (mapAttr) { AffineMap map = mapAttr.getValue(); if (map.getNumResults() != memrefType.getRank())