#include "mlir/Dialect/Linalg/Passes.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Debug.h"
namespace mlir {
#define GEN_PASS_DEF_LINALGGENERALIZENAMEDOPSPASS
#include "mlir/Dialect/Linalg/Passes.h.inc"
}
#define DEBUG_TYPE …
usingnamespacemlir;
usingnamespacemlir::linalg;
static LogicalResult generalizeNamedOpPrecondition(LinalgOp linalgOp) { … }
FailureOr<GenericOp> mlir::linalg::generalizeNamedOp(RewriterBase &rewriter,
LinalgOp linalgOp) { … }
namespace {
struct LinalgGeneralizeNamedOpsPass
: public impl::LinalgGeneralizeNamedOpsPassBase<
LinalgGeneralizeNamedOpsPass> { … };
}
void LinalgGeneralizeNamedOpsPass::runOnOperation() { … }
void mlir::linalg::populateLinalgNamedOpsGeneralizationPatterns(
RewritePatternSet &patterns) { … }