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

//===--------- SparseSpaceCollapse.cpp - Collapse Sparse Space Pass -------===//
//
// 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/Func/IR/FuncOps.h"
#include "mlir/IR/IRMapping.h"
#include "mlir/Transforms/Passes.h"

#include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
#include "mlir/Dialect/SparseTensor/Transforms/Passes.h"

namespace mlir {
#define GEN_PASS_DEF_SPARSESPACECOLLAPSE
#include "mlir/Dialect/SparseTensor/Transforms/Passes.h.inc"
} // namespace mlir

#define DEBUG_TYPE

usingnamespacemlir;
usingnamespacesparse_tensor;

namespace {

struct CollapseSpaceInfo {};

bool isCollapsableLoops(LoopLikeOpInterface parent, LoopLikeOpInterface node) {}

bool legalToCollapse(SmallVectorImpl<CollapseSpaceInfo> &toCollapse,
                     ExtractIterSpaceOp curSpace) {}

void collapseSparseSpace(MutableArrayRef<CollapseSpaceInfo> toCollapse) {}

struct SparseSpaceCollapsePass
    : public impl::SparseSpaceCollapseBase<SparseSpaceCollapsePass> {};

} // namespace

std::unique_ptr<Pass> mlir::createSparseSpaceCollapsePass() {}