llvm/polly/lib/Transform/FlattenSchedule.cpp

//===------ FlattenSchedule.cpp --------------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// Try to reduce the number of scatter dimension. Useful to make isl_union_map
// schedules more understandable. This is only intended for debugging and
// unittests, not for production use.
//
//===----------------------------------------------------------------------===//

#include "polly/FlattenSchedule.h"
#include "polly/FlattenAlgo.h"
#include "polly/ScopInfo.h"
#include "polly/ScopPass.h"
#include "polly/Support/ISLOStream.h"
#include "polly/Support/ISLTools.h"
#include "polly/Support/PollyDebug.h"
#define DEBUG_TYPE

usingnamespacepolly;
usingnamespacellvm;

namespace {

/// Print a schedule to @p OS.
///
/// Prints the schedule for each statements on a new line.
void printSchedule(raw_ostream &OS, const isl::union_map &Schedule,
                   int indent) {}

/// Flatten the schedule stored in an polly::Scop.
class FlattenSchedule final : public ScopPass {};

char FlattenSchedule::ID;

/// Print result from FlattenSchedule.
class FlattenSchedulePrinterLegacyPass final : public ScopPass {};

char FlattenSchedulePrinterLegacyPass::ID =;
} // anonymous namespace

Pass *polly::createFlattenSchedulePass() {}

Pass *polly::createFlattenSchedulePrinterLegacyPass(llvm::raw_ostream &OS) {}

INITIALIZE_PASS_BEGIN(FlattenSchedule, "polly-flatten-schedule",
                      "Polly - Flatten schedule", false, false)
INITIALIZE_PASS_END(FlattenSchedule, "polly-flatten-schedule",
                    "Polly - Flatten schedule", false, false)

INITIALIZE_PASS_BEGIN(FlattenSchedulePrinterLegacyPass,
                      "polly-print-flatten-schedule",
                      "Polly - Print flattened schedule", false, false)
INITIALIZE_PASS_DEPENDENCY(FlattenSchedule)
INITIALIZE_PASS_END(FlattenSchedulePrinterLegacyPass,
                    "polly-print-flatten-schedule",
                    "Polly - Print flattened schedule", false, false)