llvm/mlir/lib/Dialect/SparseTensor/Transforms/StageSparseOperations.cpp

//===- StageSparseOperations.cpp - stage sparse ops rewriting rules -------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
#include "mlir/Dialect/SparseTensor/IR/SparseTensorType.h"
#include "mlir/Dialect/SparseTensor/Transforms/Passes.h"

usingnamespacemlir;
usingnamespacemlir::sparse_tensor;

namespace {

struct GuardSparseAlloc
    : public OpRewritePattern<bufferization::AllocTensorOp> {};

template <typename StageWithSortOp>
struct StageUnorderedSparseOps : public OpRewritePattern<StageWithSortOp> {};
} // namespace

void mlir::populateStageSparseOperationsPatterns(RewritePatternSet &patterns) {}