#include "mlir/Dialect/MemRef/Transforms/Passes.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Arith/Utils/Utils.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/MemRef/Transforms/Transforms.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Interfaces/InferTypeOpInterface.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
namespace mlir {
namespace memref {
#define GEN_PASS_DEF_RESOLVERANKEDSHAPETYPERESULTDIMS
#define GEN_PASS_DEF_RESOLVESHAPEDTYPERESULTDIMS
#include "mlir/Dialect/MemRef/Transforms/Passes.h.inc"
}
}
usingnamespacemlir;
namespace {
template <typename OpTy>
struct DimOfShapedTypeOpInterface : public OpRewritePattern<OpTy> { … };
template <typename OpTy>
struct DimOfReifyRankedShapedTypeOpInterface : public OpRewritePattern<OpTy> { … };
struct IterArgsToInitArgs : public OpRewritePattern<tensor::DimOp> { … };
}
namespace {
struct ResolveRankedShapeTypeResultDimsPass final
: public memref::impl::ResolveRankedShapeTypeResultDimsBase<
ResolveRankedShapeTypeResultDimsPass> { … };
struct ResolveShapedTypeResultDimsPass final
: public memref::impl::ResolveShapedTypeResultDimsBase<
ResolveShapedTypeResultDimsPass> { … };
}
void memref::populateResolveRankedShapedTypeResultDimsPatterns(
RewritePatternSet &patterns) { … }
void memref::populateResolveShapedTypeResultDimsPatterns(
RewritePatternSet &patterns) { … }
void ResolveRankedShapeTypeResultDimsPass::runOnOperation() { … }
void ResolveShapedTypeResultDimsPass::runOnOperation() { … }
std::unique_ptr<Pass> memref::createResolveShapedTypeResultDimsPass() { … }
std::unique_ptr<Pass> memref::createResolveRankedShapeTypeResultDimsPass() { … }