Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | pmbaty | 1 | //===------ FlattenAlgo.h --------------------------------------*- C++ -*-===// |
2 | // |
||
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
||
4 | // See https://llvm.org/LICENSE.txt for license information. |
||
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
||
6 | // |
||
7 | //===----------------------------------------------------------------------===// |
||
8 | // |
||
9 | // Main algorithm of the FlattenSchedulePass. This is a separate file to avoid |
||
10 | // the unittest for this requiring linking against LLVM. |
||
11 | // |
||
12 | //===----------------------------------------------------------------------===// |
||
13 | |||
14 | #ifndef POLLY_FLATTENALGO_H |
||
15 | #define POLLY_FLATTENALGO_H |
||
16 | |||
17 | #include "isl/isl-noexceptions.h" |
||
18 | |||
19 | namespace polly { |
||
20 | /// Recursively flatten a schedule. |
||
21 | /// |
||
22 | /// Reduce the number of scatter dimensions as much as possible without changing |
||
23 | /// the relative order of instances in a schedule. Ideally, this results in a |
||
24 | /// single scatter dimension, but it may not always be possible to combine |
||
25 | /// dimensions, eg. if a dimension is unbounded. In worst case, the original |
||
26 | /// schedule is returned. |
||
27 | /// |
||
28 | /// Schedules with fewer dimensions may be easier to understand for humans, but |
||
29 | /// it should make no difference to the computer. |
||
30 | /// |
||
31 | /// @param Schedule The input schedule. |
||
32 | /// |
||
33 | /// @return The flattened schedule. |
||
34 | isl::union_map flattenSchedule(isl::union_map Schedule); |
||
35 | } // namespace polly |
||
36 | |||
37 | #endif /* POLLY_FLATTENALGO_H */ |