[JSON][PM] Port json import/export over to new pm
[polly-mirror.git] / include / polly / FlattenAlgo.h
blobf5bc7578d5972e1b687560aa2d9a5a0299516332
1 //===------ FlattenAlgo.h --------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // Main algorithm of the FlattenSchedulePass. This is a separate file to avoid
11 // the unittest for this requiring linking against LLVM.
13 //===----------------------------------------------------------------------===//
15 #ifndef POLLY_FLATTENALGO_H
16 #define POLLY_FLATTENALGO_H
18 #include "polly/Support/GICHelper.h"
20 namespace polly {
21 /// Recursively flatten a schedule.
22 ///
23 /// Reduce the number of scatter dimensions as much as possible without changing
24 /// the relative order of instances in a schedule. Ideally, this results in a
25 /// single scatter dimension, but it may not always be possible to combine
26 /// dimensions, eg. if a dimension is unbounded. In worst case, the original
27 /// schedule is returned.
28 ///
29 /// Schedules with fewer dimensions may be easier to understand for humans, but
30 /// it should make no difference to the computer.
31 ///
32 /// @param Schedule The input schedule.
33 ///
34 /// @return The flattened schedule.
35 isl::union_map flattenSchedule(isl::union_map Schedule);
36 } // namespace polly
38 #endif /* POLLY_FLATTENALGO_H */