#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Complex/IR/Complex.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Interfaces/ValueBoundsOpInterface.h"
#define DEBUG_TYPE …
usingnamespacemlir;
usingnamespacemlir::linalg;
#define DBGS() …
#define DBGSNL() …
static LogicalResult computePaddedShape(linalg::LinalgOp opToPad,
OpOperand *opOperand,
const LinalgPaddingOptions &options,
SmallVector<int64_t> &paddedShape,
bool &alreadyHasRequestedShape) { … }
static FailureOr<Value> padOperandToSmallestStaticBoundingBox(
RewriterBase &rewriter, linalg::LinalgOp opToPad, OpOperand *opOperand,
const LinalgPaddingOptions &options) { … }
LogicalResult
linalg::rewriteAsPaddedOp(RewriterBase &rewriter, LinalgOp opToPad,
const LinalgPaddingOptions &constOptions,
LinalgOp &paddedOp, SmallVector<Value> &replacements,
SmallVector<tensor::PadOp> &padOps) { … }
FailureOr<LinalgOp>
mlir::linalg::padAndHoistLinalgOp(RewriterBase &rewriter, LinalgOp linalgOp,
const LinalgPaddingOptions &options) { … }