1 //===------ FlattenAlgo.h --------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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"
21 /// Recursively flatten a schedule.
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.
29 /// Schedules with fewer dimensions may be easier to understand for humans, but
30 /// it should make no difference to the computer.
32 /// @param Schedule The input schedule.
34 /// @return The flattened schedule.
35 isl::union_map
flattenSchedule(isl::union_map Schedule
);
38 #endif /* POLLY_FLATTENALGO_H */