llvm/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp

//===- TestLinalgTransforms.cpp - Test Linalg transformation patterns -----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements logic for testing Linalg transformations.
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/Passes.h"
#include "mlir/Dialect/Linalg/Transforms/Hoisting.h"
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/Linalg/Utils/Utils.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"

#include "llvm/ADT/SmallVector.h"

usingnamespacemlir;
usingnamespacemlir::linalg;

namespace {
struct TestLinalgTransforms
    : public PassWrapper<TestLinalgTransforms, OperationPass<func::FuncOp>> {};
} // namespace

static void applyPatterns(func::FuncOp funcOp) {}

static void applyVectorTransferForwardingPatterns(func::FuncOp funcOp) {}

static void applyLinalgToVectorPatterns(func::FuncOp funcOp) {}

static void applyGeneralizePadTensorPatterns(func::FuncOp funcOp) {}

static void applyGeneralizeTensorPackPatterns(func::FuncOp funcOp) {}

static void applyGeneralizeTensorUnPackPatterns(func::FuncOp funcOp) {}

static void applyExtractSliceOfPadTensorSwapPattern(func::FuncOp funcOp) {}

static void applyBubbleUpExtractSliceOpPattern(func::FuncOp funcOp) {}

static void applySwapExtractSliceWithFillPattern(func::FuncOp funcOp) {}

static void applyEraseUnusedOperandsAndResultsPatterns(func::FuncOp funcOp) {}

static void applyEraseUnnecessaryInputs(func::FuncOp funcOp) {}

static void applyWinogradConv2D(func::FuncOp funcOp) {}

static void applyDecomposeWinogradOps(func::FuncOp funcOp) {}

/// Apply transformations specified as patterns.
void TestLinalgTransforms::runOnOperation() {}

namespace mlir {
namespace test {
void registerTestLinalgTransforms() {}
} // namespace test
} // namespace mlir