#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> { … };
}
void mlir::populateStageSparseOperationsPatterns(RewritePatternSet &patterns) { … }