Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 1 | //===- Schedule.cpp - Calculate an optimized schedule ---------------------===// |
| 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 | // This pass the isl to calculate a schedule that is optimized for parallelism |
| 11 | // and tileablility. The algorithm used in isl is an optimized version of the |
| 12 | // algorithm described in following paper: |
| 13 | // |
| 14 | // U. Bondhugula, A. Hartono, J. Ramanujam, and P. Sadayappan. |
| 15 | // A Practical Automatic Polyhedral Parallelizer and Locality Optimizer. |
| 16 | // In Proceedings of the 2008 ACM SIGPLAN Conference On Programming Language |
| 17 | // Design and Implementation, PLDI ’08, pages 101–113. ACM, 2008. |
| 18 | //===----------------------------------------------------------------------===// |
| 19 | |
Tobias Grosser | 967239c | 2011-10-23 20:59:44 +0000 | [diff] [blame] | 20 | #include "polly/ScheduleOptimizer.h" |
Tobias Grosser | ba0d092 | 2015-05-09 09:13:42 +0000 | [diff] [blame] | 21 | #include "polly/CodeGen/CodeGeneration.h" |
| 22 | #include "polly/DependenceInfo.h" |
| 23 | #include "polly/LinkAllPasses.h" |
| 24 | #include "polly/Options.h" |
| 25 | #include "polly/ScopInfo.h" |
| 26 | #include "polly/Support/GICHelper.h" |
| 27 | #include "llvm/Support/Debug.h" |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 28 | #include "isl/aff.h" |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 29 | #include "isl/band.h" |
Tobias Grosser | 8ad6bc3 | 2012-01-31 13:26:29 +0000 | [diff] [blame] | 30 | #include "isl/constraint.h" |
| 31 | #include "isl/map.h" |
Tobias Grosser | 42152ff | 2012-01-30 19:38:47 +0000 | [diff] [blame] | 32 | #include "isl/options.h" |
Tobias Grosser | 97d8745 | 2015-05-30 06:46:59 +0000 | [diff] [blame] | 33 | #include "isl/printer.h" |
Tobias Grosser | 8ad6bc3 | 2012-01-31 13:26:29 +0000 | [diff] [blame] | 34 | #include "isl/schedule.h" |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 35 | #include "isl/schedule_node.h" |
Tobias Grosser | 8ad6bc3 | 2012-01-31 13:26:29 +0000 | [diff] [blame] | 36 | #include "isl/space.h" |
Tobias Grosser | cd524dc | 2015-05-09 09:36:38 +0000 | [diff] [blame] | 37 | #include "isl/union_map.h" |
| 38 | #include "isl/union_set.h" |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 39 | |
| 40 | using namespace llvm; |
| 41 | using namespace polly; |
| 42 | |
Chandler Carruth | 95fef94 | 2014-04-22 03:30:19 +0000 | [diff] [blame] | 43 | #define DEBUG_TYPE "polly-opt-isl" |
| 44 | |
Tobias Grosser | 58032cb | 2013-06-23 01:29:29 +0000 | [diff] [blame] | 45 | namespace polly { |
| 46 | bool DisablePollyTiling; |
| 47 | } |
Tobias Grosser | e602a07 | 2013-05-07 07:30:56 +0000 | [diff] [blame] | 48 | static cl::opt<bool, true> |
Tobias Grosser | 483a90d | 2014-07-09 10:50:10 +0000 | [diff] [blame] | 49 | DisableTiling("polly-no-tiling", |
| 50 | cl::desc("Disable tiling in the scheduler"), |
| 51 | cl::location(polly::DisablePollyTiling), cl::init(false), |
| 52 | cl::ZeroOrMore, cl::cat(PollyCategory)); |
Tobias Grosser | 353a268 | 2011-10-23 20:59:26 +0000 | [diff] [blame] | 53 | |
Tobias Grosser | a26db47 | 2012-01-30 19:38:43 +0000 | [diff] [blame] | 54 | static cl::opt<std::string> |
Tobias Grosser | 483a90d | 2014-07-09 10:50:10 +0000 | [diff] [blame] | 55 | OptimizeDeps("polly-opt-optimize-only", |
| 56 | cl::desc("Only a certain kind of dependences (all/raw)"), |
| 57 | cl::Hidden, cl::init("all"), cl::ZeroOrMore, |
| 58 | cl::cat(PollyCategory)); |
Tobias Grosser | 1deda29 | 2012-02-14 14:02:48 +0000 | [diff] [blame] | 59 | |
| 60 | static cl::opt<std::string> |
Tobias Grosser | 483a90d | 2014-07-09 10:50:10 +0000 | [diff] [blame] | 61 | SimplifyDeps("polly-opt-simplify-deps", |
| 62 | cl::desc("Dependences should be simplified (yes/no)"), |
| 63 | cl::Hidden, cl::init("yes"), cl::ZeroOrMore, |
| 64 | cl::cat(PollyCategory)); |
Tobias Grosser | a26db47 | 2012-01-30 19:38:43 +0000 | [diff] [blame] | 65 | |
Tobias Grosser | 483a90d | 2014-07-09 10:50:10 +0000 | [diff] [blame] | 66 | static cl::opt<int> MaxConstantTerm( |
| 67 | "polly-opt-max-constant-term", |
| 68 | cl::desc("The maximal constant term allowed (-1 is unlimited)"), cl::Hidden, |
| 69 | cl::init(20), cl::ZeroOrMore, cl::cat(PollyCategory)); |
Tobias Grosser | 992e60c | 2012-02-20 08:41:15 +0000 | [diff] [blame] | 70 | |
Tobias Grosser | 483a90d | 2014-07-09 10:50:10 +0000 | [diff] [blame] | 71 | static cl::opt<int> MaxCoefficient( |
| 72 | "polly-opt-max-coefficient", |
| 73 | cl::desc("The maximal coefficient allowed (-1 is unlimited)"), cl::Hidden, |
| 74 | cl::init(20), cl::ZeroOrMore, cl::cat(PollyCategory)); |
| 75 | |
| 76 | static cl::opt<std::string> FusionStrategy( |
| 77 | "polly-opt-fusion", cl::desc("The fusion strategy to choose (min/max)"), |
| 78 | cl::Hidden, cl::init("min"), cl::ZeroOrMore, cl::cat(PollyCategory)); |
Tobias Grosser | 92f5480 | 2012-02-20 08:41:47 +0000 | [diff] [blame] | 79 | |
Tobias Grosser | e602a07 | 2013-05-07 07:30:56 +0000 | [diff] [blame] | 80 | static cl::opt<std::string> |
Tobias Grosser | 483a90d | 2014-07-09 10:50:10 +0000 | [diff] [blame] | 81 | MaximizeBandDepth("polly-opt-maximize-bands", |
| 82 | cl::desc("Maximize the band depth (yes/no)"), cl::Hidden, |
| 83 | cl::init("yes"), cl::ZeroOrMore, cl::cat(PollyCategory)); |
Tobias Grosser | b3ad85b | 2012-01-30 19:38:50 +0000 | [diff] [blame] | 84 | |
Tobias Grosser | 483a90d | 2014-07-09 10:50:10 +0000 | [diff] [blame] | 85 | static cl::opt<int> DefaultTileSize( |
| 86 | "polly-default-tile-size", |
| 87 | cl::desc("The default tile size (if not enough were provided by" |
| 88 | " --polly-tile-sizes)"), |
| 89 | cl::Hidden, cl::init(32), cl::ZeroOrMore, cl::cat(PollyCategory)); |
Johannes Doerfert | c3958b2 | 2014-05-28 17:21:02 +0000 | [diff] [blame] | 90 | |
| 91 | static cl::list<int> TileSizes("polly-tile-sizes", |
| 92 | cl::desc("A tile size" |
| 93 | " for each loop dimension, filled with" |
| 94 | " --polly-default-tile-size"), |
| 95 | cl::Hidden, cl::ZeroOrMore, cl::CommaSeparated, |
| 96 | cl::cat(PollyCategory)); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 97 | namespace { |
| 98 | |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 99 | class IslScheduleOptimizer : public ScopPass { |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 100 | public: |
| 101 | static char ID; |
Tobias Grosser | 5a56cbf | 2014-04-16 07:33:47 +0000 | [diff] [blame] | 102 | explicit IslScheduleOptimizer() : ScopPass(ID) { LastSchedule = nullptr; } |
Tobias Grosser | 2878142 | 2012-10-16 07:29:19 +0000 | [diff] [blame] | 103 | |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 104 | ~IslScheduleOptimizer() { isl_schedule_free(LastSchedule); } |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 105 | |
Johannes Doerfert | 909a3bf | 2015-03-01 18:42:08 +0000 | [diff] [blame] | 106 | bool runOnScop(Scop &S) override; |
| 107 | void printScop(raw_ostream &OS, Scop &S) const override; |
| 108 | void getAnalysisUsage(AnalysisUsage &AU) const override; |
Tobias Grosser | 460e9a4 | 2012-04-25 13:22:43 +0000 | [diff] [blame] | 109 | |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 110 | private: |
| 111 | isl_schedule *LastSchedule; |
Tobias Grosser | 2878142 | 2012-10-16 07:29:19 +0000 | [diff] [blame] | 112 | |
Johannes Doerfert | 7ceb040 | 2015-02-11 17:25:09 +0000 | [diff] [blame] | 113 | /// @brief Decide if the @p NewSchedule is profitable for @p S. |
| 114 | /// |
| 115 | /// @param S The SCoP we optimize. |
| 116 | /// @param NewSchedule The new schedule we computed. |
| 117 | /// |
| 118 | /// @return True, if we believe @p NewSchedule is an improvement for @p S. |
| 119 | bool isProfitableSchedule(Scop &S, __isl_keep isl_union_map *NewSchedule); |
| 120 | |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 121 | /// @brief Create a map that pre-vectorizes one scheduling dimension. |
| 122 | /// |
| 123 | /// getPrevectorMap creates a map that maps each input dimension to the same |
| 124 | /// output dimension, except for the dimension DimToVectorize. |
| 125 | /// DimToVectorize is strip mined by 'VectorWidth' and the newly created |
| 126 | /// point loop of DimToVectorize is moved to the innermost level. |
| 127 | /// |
| 128 | /// Example (DimToVectorize=0, ScheduleDimensions=2, VectorWidth=4): |
| 129 | /// |
| 130 | /// | Before transformation |
| 131 | /// | |
| 132 | /// | A[i,j] -> [i,j] |
| 133 | /// | |
| 134 | /// | for (i = 0; i < 128; i++) |
| 135 | /// | for (j = 0; j < 128; j++) |
| 136 | /// | A(i,j); |
| 137 | /// |
| 138 | /// Prevector map: |
| 139 | /// [i,j] -> [it,j,ip] : it % 4 = 0 and it <= ip <= it + 3 and i = ip |
| 140 | /// |
| 141 | /// | After transformation: |
| 142 | /// | |
| 143 | /// | A[i,j] -> [it,j,ip] : it % 4 = 0 and it <= ip <= it + 3 and i = ip |
| 144 | /// | |
| 145 | /// | for (it = 0; it < 128; it+=4) |
| 146 | /// | for (j = 0; j < 128; j++) |
| 147 | /// | for (ip = max(0,it); ip < min(128, it + 3); ip++) |
| 148 | /// | A(ip,j); |
| 149 | /// |
| 150 | /// The goal of this transformation is to create a trivially vectorizable |
| 151 | /// loop. This means a parallel loop at the innermost level that has a |
| 152 | /// constant number of iterations corresponding to the target vector width. |
| 153 | /// |
| 154 | /// This transformation creates a loop at the innermost level. The loop has |
| 155 | /// a constant number of iterations, if the number of loop iterations at |
| 156 | /// DimToVectorize can be divided by VectorWidth. The default VectorWidth is |
| 157 | /// currently constant and not yet target specific. This function does not |
| 158 | /// reason about parallelism. |
Tobias Grosser | 442c6cc | 2015-03-19 07:43:35 +0000 | [diff] [blame] | 159 | static __isl_give isl_map *getPrevectorMap(isl_ctx *ctx, int DimToVectorize, |
| 160 | int ScheduleDimensions, |
| 161 | int VectorWidth = 4); |
Tobias Grosser | 460e9a4 | 2012-04-25 13:22:43 +0000 | [diff] [blame] | 162 | |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 163 | /// @brief Apply additional optimizations on the bands in the schedule tree. |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 164 | /// |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 165 | /// We are looking for an innermost band node and apply the following |
| 166 | /// transformations: |
| 167 | /// |
| 168 | /// - Tile the band |
| 169 | /// - if the band is tileable |
| 170 | /// - if the band has more than one loop dimension |
| 171 | /// |
Tobias Grosser | 3b10c94 | 2015-07-25 12:28:56 +0000 | [diff] [blame] | 172 | /// - Prevectorize the schedule of the band (or the point loop in case of |
| 173 | /// tiling) |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 174 | /// - if vectorization is enabled |
| 175 | /// |
| 176 | /// @param Node The schedule node to (possibly) optimize. |
| 177 | /// @param User A pointer to forward some use information (currently unused). |
| 178 | static isl_schedule_node *optimizeBand(isl_schedule_node *Node, void *User); |
Tobias Grosser | 460e9a4 | 2012-04-25 13:22:43 +0000 | [diff] [blame] | 179 | |
Tobias Grosser | 808cd69 | 2015-07-14 09:33:13 +0000 | [diff] [blame] | 180 | /// @brief Apply post-scheduling transformations. |
| 181 | /// |
| 182 | /// This function applies a set of additional local transformations on the |
| 183 | /// schedule tree as it computed by the isl scheduler. Local transformations |
| 184 | /// applied include: |
| 185 | /// |
| 186 | /// - Tiling |
| 187 | /// - Prevectorization |
| 188 | /// |
| 189 | /// @param Schedule The schedule object post-transformations will be applied |
| 190 | /// on. |
| 191 | /// @returns The transformed schedule. |
| 192 | static __isl_give isl_schedule * |
| 193 | addPostTransforms(__isl_take isl_schedule *Schedule); |
Tobias Grosser | 2878142 | 2012-10-16 07:29:19 +0000 | [diff] [blame] | 194 | |
Tobias Grosser | 20532b8 | 2014-04-11 17:56:49 +0000 | [diff] [blame] | 195 | using llvm::Pass::doFinalization; |
| 196 | |
Johannes Doerfert | 909a3bf | 2015-03-01 18:42:08 +0000 | [diff] [blame] | 197 | virtual bool doFinalization() override { |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 198 | isl_schedule_free(LastSchedule); |
Tobias Grosser | 5a56cbf | 2014-04-16 07:33:47 +0000 | [diff] [blame] | 199 | LastSchedule = nullptr; |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 200 | return true; |
| 201 | } |
| 202 | }; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 203 | } |
| 204 | |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 205 | char IslScheduleOptimizer::ID = 0; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 206 | |
Tobias Grosser | 442c6cc | 2015-03-19 07:43:35 +0000 | [diff] [blame] | 207 | __isl_give isl_map * |
| 208 | IslScheduleOptimizer::getPrevectorMap(isl_ctx *ctx, int DimToVectorize, |
| 209 | int ScheduleDimensions, int VectorWidth) { |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 210 | isl_space *Space; |
| 211 | isl_local_space *LocalSpace, *LocalSpaceRange; |
| 212 | isl_set *Modulo; |
| 213 | isl_map *TilingMap; |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 214 | isl_constraint *c; |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 215 | isl_aff *Aff; |
| 216 | int PointDimension; /* ip */ |
| 217 | int TileDimension; /* it */ |
Tobias Grosser | edab135 | 2013-06-21 06:41:31 +0000 | [diff] [blame] | 218 | isl_val *VectorWidthMP; |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 219 | |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 220 | assert(0 <= DimToVectorize && DimToVectorize < ScheduleDimensions); |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 221 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 222 | Space = isl_space_alloc(ctx, 0, ScheduleDimensions, ScheduleDimensions + 1); |
| 223 | TilingMap = isl_map_universe(isl_space_copy(Space)); |
| 224 | LocalSpace = isl_local_space_from_space(Space); |
| 225 | PointDimension = ScheduleDimensions; |
| 226 | TileDimension = DimToVectorize; |
| 227 | |
| 228 | // Create an identity map for everything except DimToVectorize and map |
| 229 | // DimToVectorize to the point loop at the innermost dimension. |
Tobias Grosser | 1b6ea57 | 2015-05-21 19:02:44 +0000 | [diff] [blame] | 230 | for (int i = 0; i < ScheduleDimensions; i++) |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 231 | if (i == DimToVectorize) |
Tobias Grosser | 1b6ea57 | 2015-05-21 19:02:44 +0000 | [diff] [blame] | 232 | TilingMap = |
| 233 | isl_map_equate(TilingMap, isl_dim_in, i, isl_dim_out, PointDimension); |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 234 | else |
Tobias Grosser | 1b6ea57 | 2015-05-21 19:02:44 +0000 | [diff] [blame] | 235 | TilingMap = isl_map_equate(TilingMap, isl_dim_in, i, isl_dim_out, i); |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 236 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 237 | // it % 'VectorWidth' = 0 |
| 238 | LocalSpaceRange = isl_local_space_range(isl_local_space_copy(LocalSpace)); |
| 239 | Aff = isl_aff_zero_on_domain(LocalSpaceRange); |
| 240 | Aff = isl_aff_set_constant_si(Aff, VectorWidth); |
| 241 | Aff = isl_aff_set_coefficient_si(Aff, isl_dim_in, TileDimension, 1); |
Tobias Grosser | edab135 | 2013-06-21 06:41:31 +0000 | [diff] [blame] | 242 | VectorWidthMP = isl_val_int_from_si(ctx, VectorWidth); |
| 243 | Aff = isl_aff_mod_val(Aff, VectorWidthMP); |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 244 | Modulo = isl_pw_aff_zero_set(isl_pw_aff_from_aff(Aff)); |
| 245 | TilingMap = isl_map_intersect_range(TilingMap, Modulo); |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 246 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 247 | // it <= ip |
Tobias Grosser | 1b6ea57 | 2015-05-21 19:02:44 +0000 | [diff] [blame] | 248 | TilingMap = isl_map_order_le(TilingMap, isl_dim_out, TileDimension, |
| 249 | isl_dim_out, PointDimension); |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 250 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 251 | // ip <= it + ('VectorWidth' - 1) |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 252 | c = isl_inequality_alloc(LocalSpace); |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 253 | isl_constraint_set_coefficient_si(c, isl_dim_out, TileDimension, 1); |
| 254 | isl_constraint_set_coefficient_si(c, isl_dim_out, PointDimension, -1); |
| 255 | isl_constraint_set_constant_si(c, VectorWidth - 1); |
| 256 | TilingMap = isl_map_add_constraint(TilingMap, c); |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 257 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 258 | return TilingMap; |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 259 | } |
| 260 | |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 261 | isl_schedule_node *IslScheduleOptimizer::optimizeBand(isl_schedule_node *Node, |
| 262 | void *User) { |
| 263 | if (isl_schedule_node_get_type(Node) != isl_schedule_node_band) |
| 264 | return Node; |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 265 | |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 266 | if (isl_schedule_node_n_children(Node) != 1) |
| 267 | return Node; |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 268 | |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 269 | if (!isl_schedule_node_band_get_permutable(Node)) |
| 270 | return Node; |
Tobias Grosser | 44f19ac | 2011-07-05 22:15:53 +0000 | [diff] [blame] | 271 | |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 272 | auto Space = isl_schedule_node_band_get_space(Node); |
| 273 | auto Dims = isl_space_dim(Space, isl_dim_set); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 274 | |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 275 | if (Dims <= 1) { |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 276 | isl_space_free(Space); |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 277 | return Node; |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 278 | } |
| 279 | |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 280 | auto Child = isl_schedule_node_get_child(Node, 0); |
| 281 | auto Type = isl_schedule_node_get_type(Child); |
| 282 | isl_schedule_node_free(Child); |
| 283 | |
| 284 | if (Type != isl_schedule_node_leaf) { |
| 285 | isl_space_free(Space); |
| 286 | return Node; |
| 287 | } |
| 288 | |
| 289 | auto Sizes = isl_multi_val_zero(Space); |
| 290 | auto Ctx = isl_schedule_node_get_ctx(Node); |
| 291 | |
| 292 | for (unsigned i = 0; i < Dims; i++) { |
| 293 | auto tileSize = TileSizes.size() > i ? TileSizes[i] : DefaultTileSize; |
| 294 | Sizes = isl_multi_val_set_val(Sizes, i, isl_val_int_from_si(Ctx, tileSize)); |
| 295 | } |
| 296 | |
Tobias Grosser | 02cf69a | 2015-04-05 21:52:21 +0000 | [diff] [blame] | 297 | isl_schedule_node *Res; |
| 298 | |
| 299 | if (DisableTiling) { |
| 300 | isl_multi_val_free(Sizes); |
| 301 | Res = Node; |
| 302 | } else { |
| 303 | Res = isl_schedule_node_band_tile(Node, Sizes); |
Tobias Grosser | 2764794 | 2015-07-26 19:22:35 +0000 | [diff] [blame^] | 304 | Res = isl_schedule_node_child(Res, 0); |
Tobias Grosser | 02cf69a | 2015-04-05 21:52:21 +0000 | [diff] [blame] | 305 | } |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 306 | |
| 307 | if (PollyVectorizerChoice == VECTORIZER_NONE) |
| 308 | return Res; |
| 309 | |
Tobias Grosser | 3b10c94 | 2015-07-25 12:28:56 +0000 | [diff] [blame] | 310 | auto Schedule = isl_schedule_node_band_get_partial_schedule(Res); |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 311 | |
| 312 | for (int i = Dims - 1; i >= 0; i--) { |
Tobias Grosser | 3b10c94 | 2015-07-25 12:28:56 +0000 | [diff] [blame] | 313 | if (isl_schedule_node_band_member_get_coincident(Res, i)) { |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 314 | auto TileMap = IslScheduleOptimizer::getPrevectorMap(Ctx, i, Dims); |
| 315 | auto TileUMap = isl_union_map_from_map(TileMap); |
Tobias Grosser | 3b10c94 | 2015-07-25 12:28:56 +0000 | [diff] [blame] | 316 | auto Schedule2 = isl_union_map_apply_range( |
| 317 | isl_union_map_from_multi_union_pw_aff(Schedule), TileUMap); |
| 318 | Schedule = isl_multi_union_pw_aff_from_union_map(Schedule2); |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 319 | break; |
| 320 | } |
| 321 | } |
| 322 | |
Tobias Grosser | 3b10c94 | 2015-07-25 12:28:56 +0000 | [diff] [blame] | 323 | Res = isl_schedule_node_delete(Res); |
| 324 | Res = isl_schedule_node_insert_partial_schedule(Res, Schedule); |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 325 | return Res; |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 326 | } |
| 327 | |
Tobias Grosser | 808cd69 | 2015-07-14 09:33:13 +0000 | [diff] [blame] | 328 | __isl_give isl_schedule * |
| 329 | IslScheduleOptimizer::addPostTransforms(__isl_take isl_schedule *Schedule) { |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 330 | isl_schedule_node *Root = isl_schedule_get_root(Schedule); |
Tobias Grosser | 808cd69 | 2015-07-14 09:33:13 +0000 | [diff] [blame] | 331 | isl_schedule_free(Schedule); |
Tobias Grosser | b2f3992 | 2015-05-28 13:32:11 +0000 | [diff] [blame] | 332 | Root = isl_schedule_node_map_descendant_bottom_up( |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 333 | Root, IslScheduleOptimizer::optimizeBand, NULL); |
Tobias Grosser | 808cd69 | 2015-07-14 09:33:13 +0000 | [diff] [blame] | 334 | auto S = isl_schedule_node_get_schedule(Root); |
Tobias Grosser | bbb4cec | 2015-03-22 12:06:39 +0000 | [diff] [blame] | 335 | isl_schedule_node_free(Root); |
Tobias Grosser | 808cd69 | 2015-07-14 09:33:13 +0000 | [diff] [blame] | 336 | return S; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 337 | } |
| 338 | |
Johannes Doerfert | 7ceb040 | 2015-02-11 17:25:09 +0000 | [diff] [blame] | 339 | bool IslScheduleOptimizer::isProfitableSchedule( |
| 340 | Scop &S, __isl_keep isl_union_map *NewSchedule) { |
| 341 | // To understand if the schedule has been optimized we check if the schedule |
| 342 | // has changed at all. |
| 343 | // TODO: We can improve this by tracking if any necessarily beneficial |
| 344 | // transformations have been performed. This can e.g. be tiling, loop |
| 345 | // interchange, or ...) We can track this either at the place where the |
| 346 | // transformation has been performed or, in case of automatic ILP based |
| 347 | // optimizations, by comparing (yet to be defined) performance metrics |
| 348 | // before/after the scheduling optimizer |
| 349 | // (e.g., #stride-one accesses) |
| 350 | isl_union_map *OldSchedule = S.getSchedule(); |
| 351 | bool changed = !isl_union_map_is_equal(OldSchedule, NewSchedule); |
| 352 | isl_union_map_free(OldSchedule); |
| 353 | return changed; |
| 354 | } |
| 355 | |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 356 | bool IslScheduleOptimizer::runOnScop(Scop &S) { |
Johannes Doerfert | 6f7921f | 2015-02-14 12:02:24 +0000 | [diff] [blame] | 357 | |
| 358 | // Skip empty SCoPs but still allow code generation as it will delete the |
| 359 | // loops present but not needed. |
| 360 | if (S.getSize() == 0) { |
| 361 | S.markAsOptimized(); |
| 362 | return false; |
| 363 | } |
| 364 | |
Johannes Doerfert | 7e6424b | 2015-03-05 00:43:48 +0000 | [diff] [blame] | 365 | const Dependences &D = getAnalysis<DependenceInfo>().getDependences(); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 366 | |
Johannes Doerfert | 7e6424b | 2015-03-05 00:43:48 +0000 | [diff] [blame] | 367 | if (!D.hasValidDependences()) |
Tobias Grosser | 38c36ea | 2014-02-23 15:15:44 +0000 | [diff] [blame] | 368 | return false; |
| 369 | |
Tobias Grosser | 2878142 | 2012-10-16 07:29:19 +0000 | [diff] [blame] | 370 | isl_schedule_free(LastSchedule); |
Tobias Grosser | 5a56cbf | 2014-04-16 07:33:47 +0000 | [diff] [blame] | 371 | LastSchedule = nullptr; |
Tobias Grosser | 2878142 | 2012-10-16 07:29:19 +0000 | [diff] [blame] | 372 | |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 373 | // Build input data. |
Johannes Doerfert | 7e6424b | 2015-03-05 00:43:48 +0000 | [diff] [blame] | 374 | int ValidityKinds = |
| 375 | Dependences::TYPE_RAW | Dependences::TYPE_WAR | Dependences::TYPE_WAW; |
Tobias Grosser | 1deda29 | 2012-02-14 14:02:48 +0000 | [diff] [blame] | 376 | int ProximityKinds; |
| 377 | |
| 378 | if (OptimizeDeps == "all") |
Johannes Doerfert | 7e6424b | 2015-03-05 00:43:48 +0000 | [diff] [blame] | 379 | ProximityKinds = |
| 380 | Dependences::TYPE_RAW | Dependences::TYPE_WAR | Dependences::TYPE_WAW; |
Tobias Grosser | 1deda29 | 2012-02-14 14:02:48 +0000 | [diff] [blame] | 381 | else if (OptimizeDeps == "raw") |
Johannes Doerfert | 7e6424b | 2015-03-05 00:43:48 +0000 | [diff] [blame] | 382 | ProximityKinds = Dependences::TYPE_RAW; |
Tobias Grosser | 1deda29 | 2012-02-14 14:02:48 +0000 | [diff] [blame] | 383 | else { |
| 384 | errs() << "Do not know how to optimize for '" << OptimizeDeps << "'" |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 385 | << " Falling back to optimizing all dependences.\n"; |
Johannes Doerfert | 7e6424b | 2015-03-05 00:43:48 +0000 | [diff] [blame] | 386 | ProximityKinds = |
| 387 | Dependences::TYPE_RAW | Dependences::TYPE_WAR | Dependences::TYPE_WAW; |
Tobias Grosser | 1deda29 | 2012-02-14 14:02:48 +0000 | [diff] [blame] | 388 | } |
| 389 | |
Tobias Grosser | 5f9a762 | 2012-02-14 14:02:40 +0000 | [diff] [blame] | 390 | isl_union_set *Domain = S.getDomains(); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 391 | |
Tobias Grosser | 98610ee | 2012-02-13 23:31:39 +0000 | [diff] [blame] | 392 | if (!Domain) |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 393 | return false; |
| 394 | |
Johannes Doerfert | 7e6424b | 2015-03-05 00:43:48 +0000 | [diff] [blame] | 395 | isl_union_map *Validity = D.getDependences(ValidityKinds); |
| 396 | isl_union_map *Proximity = D.getDependences(ProximityKinds); |
Tobias Grosser | 8a50702 | 2012-03-16 11:51:41 +0000 | [diff] [blame] | 397 | |
Tobias Grosser | a26db47 | 2012-01-30 19:38:43 +0000 | [diff] [blame] | 398 | // Simplify the dependences by removing the constraints introduced by the |
| 399 | // domains. This can speed up the scheduling time significantly, as large |
| 400 | // constant coefficients will be removed from the dependences. The |
| 401 | // introduction of some additional dependences reduces the possible |
| 402 | // transformations, but in most cases, such transformation do not seem to be |
| 403 | // interesting anyway. In some cases this option may stop the scheduler to |
| 404 | // find any schedule. |
| 405 | if (SimplifyDeps == "yes") { |
Tobias Grosser | 00383a7 | 2012-02-14 14:02:44 +0000 | [diff] [blame] | 406 | Validity = isl_union_map_gist_domain(Validity, isl_union_set_copy(Domain)); |
| 407 | Validity = isl_union_map_gist_range(Validity, isl_union_set_copy(Domain)); |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 408 | Proximity = |
| 409 | isl_union_map_gist_domain(Proximity, isl_union_set_copy(Domain)); |
Tobias Grosser | 00383a7 | 2012-02-14 14:02:44 +0000 | [diff] [blame] | 410 | Proximity = isl_union_map_gist_range(Proximity, isl_union_set_copy(Domain)); |
Tobias Grosser | a26db47 | 2012-01-30 19:38:43 +0000 | [diff] [blame] | 411 | } else if (SimplifyDeps != "no") { |
| 412 | errs() << "warning: Option -polly-opt-simplify-deps should either be 'yes' " |
| 413 | "or 'no'. Falling back to default: 'yes'\n"; |
| 414 | } |
| 415 | |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 416 | DEBUG(dbgs() << "\n\nCompute schedule from: "); |
Tobias Grosser | 01aea58 | 2014-10-22 23:16:28 +0000 | [diff] [blame] | 417 | DEBUG(dbgs() << "Domain := " << stringFromIslObj(Domain) << ";\n"); |
| 418 | DEBUG(dbgs() << "Proximity := " << stringFromIslObj(Proximity) << ";\n"); |
| 419 | DEBUG(dbgs() << "Validity := " << stringFromIslObj(Validity) << ";\n"); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 420 | |
Michael Kruse | c59f22c | 2015-06-18 16:45:40 +0000 | [diff] [blame] | 421 | unsigned IslSerializeSCCs; |
Tobias Grosser | b3ad85b | 2012-01-30 19:38:50 +0000 | [diff] [blame] | 422 | |
| 423 | if (FusionStrategy == "max") { |
Michael Kruse | c59f22c | 2015-06-18 16:45:40 +0000 | [diff] [blame] | 424 | IslSerializeSCCs = 0; |
Tobias Grosser | b3ad85b | 2012-01-30 19:38:50 +0000 | [diff] [blame] | 425 | } else if (FusionStrategy == "min") { |
Michael Kruse | c59f22c | 2015-06-18 16:45:40 +0000 | [diff] [blame] | 426 | IslSerializeSCCs = 1; |
Tobias Grosser | b3ad85b | 2012-01-30 19:38:50 +0000 | [diff] [blame] | 427 | } else { |
| 428 | errs() << "warning: Unknown fusion strategy. Falling back to maximal " |
| 429 | "fusion.\n"; |
Michael Kruse | c59f22c | 2015-06-18 16:45:40 +0000 | [diff] [blame] | 430 | IslSerializeSCCs = 0; |
Tobias Grosser | b3ad85b | 2012-01-30 19:38:50 +0000 | [diff] [blame] | 431 | } |
| 432 | |
Tobias Grosser | 95e860c | 2012-01-30 19:38:54 +0000 | [diff] [blame] | 433 | int IslMaximizeBands; |
| 434 | |
Tobias Grosser | a4ea90b | 2012-01-30 22:43:56 +0000 | [diff] [blame] | 435 | if (MaximizeBandDepth == "yes") { |
Tobias Grosser | 95e860c | 2012-01-30 19:38:54 +0000 | [diff] [blame] | 436 | IslMaximizeBands = 1; |
Tobias Grosser | a4ea90b | 2012-01-30 22:43:56 +0000 | [diff] [blame] | 437 | } else if (MaximizeBandDepth == "no") { |
Tobias Grosser | 95e860c | 2012-01-30 19:38:54 +0000 | [diff] [blame] | 438 | IslMaximizeBands = 0; |
| 439 | } else { |
| 440 | errs() << "warning: Option -polly-opt-maximize-bands should either be 'yes'" |
| 441 | " or 'no'. Falling back to default: 'yes'\n"; |
| 442 | IslMaximizeBands = 1; |
| 443 | } |
| 444 | |
Michael Kruse | c59f22c | 2015-06-18 16:45:40 +0000 | [diff] [blame] | 445 | isl_options_set_schedule_serialize_sccs(S.getIslCtx(), IslSerializeSCCs); |
Tobias Grosser | 95e860c | 2012-01-30 19:38:54 +0000 | [diff] [blame] | 446 | isl_options_set_schedule_maximize_band_depth(S.getIslCtx(), IslMaximizeBands); |
Tobias Grosser | 992e60c | 2012-02-20 08:41:15 +0000 | [diff] [blame] | 447 | isl_options_set_schedule_max_constant_term(S.getIslCtx(), MaxConstantTerm); |
Tobias Grosser | 92f5480 | 2012-02-20 08:41:47 +0000 | [diff] [blame] | 448 | isl_options_set_schedule_max_coefficient(S.getIslCtx(), MaxCoefficient); |
Tobias Grosser | 4f6bcef | 2015-03-31 07:52:36 +0000 | [diff] [blame] | 449 | isl_options_set_tile_scale_tile_loops(S.getIslCtx(), 0); |
Tobias Grosser | 42152ff | 2012-01-30 19:38:47 +0000 | [diff] [blame] | 450 | |
| 451 | isl_options_set_on_error(S.getIslCtx(), ISL_ON_ERROR_CONTINUE); |
Tobias Grosser | a38c924 | 2014-01-26 19:36:28 +0000 | [diff] [blame] | 452 | |
| 453 | isl_schedule_constraints *ScheduleConstraints; |
| 454 | ScheduleConstraints = isl_schedule_constraints_on_domain(Domain); |
| 455 | ScheduleConstraints = |
| 456 | isl_schedule_constraints_set_proximity(ScheduleConstraints, Proximity); |
| 457 | ScheduleConstraints = isl_schedule_constraints_set_validity( |
| 458 | ScheduleConstraints, isl_union_map_copy(Validity)); |
| 459 | ScheduleConstraints = |
| 460 | isl_schedule_constraints_set_coincidence(ScheduleConstraints, Validity); |
Tobias Grosser | 00383a7 | 2012-02-14 14:02:44 +0000 | [diff] [blame] | 461 | isl_schedule *Schedule; |
Tobias Grosser | a38c924 | 2014-01-26 19:36:28 +0000 | [diff] [blame] | 462 | Schedule = isl_schedule_constraints_compute_schedule(ScheduleConstraints); |
Tobias Grosser | 42152ff | 2012-01-30 19:38:47 +0000 | [diff] [blame] | 463 | isl_options_set_on_error(S.getIslCtx(), ISL_ON_ERROR_ABORT); |
| 464 | |
| 465 | // In cases the scheduler is not able to optimize the code, we just do not |
| 466 | // touch the schedule. |
Tobias Grosser | 98610ee | 2012-02-13 23:31:39 +0000 | [diff] [blame] | 467 | if (!Schedule) |
Tobias Grosser | 42152ff | 2012-01-30 19:38:47 +0000 | [diff] [blame] | 468 | return false; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 469 | |
Tobias Grosser | 97d8745 | 2015-05-30 06:46:59 +0000 | [diff] [blame] | 470 | DEBUG({ |
| 471 | auto *P = isl_printer_to_str(S.getIslCtx()); |
| 472 | P = isl_printer_set_yaml_style(P, ISL_YAML_STYLE_BLOCK); |
| 473 | P = isl_printer_print_schedule(P, Schedule); |
| 474 | dbgs() << "NewScheduleTree: \n" << isl_printer_get_str(P) << "\n"; |
| 475 | isl_printer_free(P); |
| 476 | }); |
Tobias Grosser | 4d63b9d | 2012-02-20 08:41:21 +0000 | [diff] [blame] | 477 | |
Tobias Grosser | 808cd69 | 2015-07-14 09:33:13 +0000 | [diff] [blame] | 478 | isl_schedule *NewSchedule = addPostTransforms(Schedule); |
| 479 | isl_union_map *NewScheduleMap = isl_schedule_get_map(NewSchedule); |
Johannes Doerfert | 7ceb040 | 2015-02-11 17:25:09 +0000 | [diff] [blame] | 480 | |
Tobias Grosser | 808cd69 | 2015-07-14 09:33:13 +0000 | [diff] [blame] | 481 | if (!isProfitableSchedule(S, NewScheduleMap)) { |
| 482 | isl_union_map_free(NewScheduleMap); |
| 483 | isl_schedule_free(NewSchedule); |
Johannes Doerfert | 7ceb040 | 2015-02-11 17:25:09 +0000 | [diff] [blame] | 484 | return false; |
| 485 | } |
| 486 | |
Tobias Grosser | 808cd69 | 2015-07-14 09:33:13 +0000 | [diff] [blame] | 487 | S.setScheduleTree(NewSchedule); |
Johannes Doerfert | 7ceb040 | 2015-02-11 17:25:09 +0000 | [diff] [blame] | 488 | S.markAsOptimized(); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 489 | |
Tobias Grosser | 808cd69 | 2015-07-14 09:33:13 +0000 | [diff] [blame] | 490 | isl_union_map_free(NewScheduleMap); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 491 | return false; |
| 492 | } |
| 493 | |
Johannes Doerfert | 3fe584d | 2015-03-01 18:40:25 +0000 | [diff] [blame] | 494 | void IslScheduleOptimizer::printScop(raw_ostream &OS, Scop &) const { |
Tobias Grosser | 2878142 | 2012-10-16 07:29:19 +0000 | [diff] [blame] | 495 | isl_printer *p; |
| 496 | char *ScheduleStr; |
| 497 | |
| 498 | OS << "Calculated schedule:\n"; |
| 499 | |
| 500 | if (!LastSchedule) { |
| 501 | OS << "n/a\n"; |
| 502 | return; |
| 503 | } |
| 504 | |
| 505 | p = isl_printer_to_str(isl_schedule_get_ctx(LastSchedule)); |
| 506 | p = isl_printer_print_schedule(p, LastSchedule); |
| 507 | ScheduleStr = isl_printer_get_str(p); |
| 508 | isl_printer_free(p); |
| 509 | |
| 510 | OS << ScheduleStr << "\n"; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 511 | } |
| 512 | |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 513 | void IslScheduleOptimizer::getAnalysisUsage(AnalysisUsage &AU) const { |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 514 | ScopPass::getAnalysisUsage(AU); |
Johannes Doerfert | f6557f9 | 2015-03-04 22:43:40 +0000 | [diff] [blame] | 515 | AU.addRequired<DependenceInfo>(); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 516 | } |
| 517 | |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 518 | Pass *polly::createIslScheduleOptimizerPass() { |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 519 | return new IslScheduleOptimizer(); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 520 | } |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 521 | |
| 522 | INITIALIZE_PASS_BEGIN(IslScheduleOptimizer, "polly-opt-isl", |
| 523 | "Polly - Optimize schedule of SCoP", false, false); |
Johannes Doerfert | f6557f9 | 2015-03-04 22:43:40 +0000 | [diff] [blame] | 524 | INITIALIZE_PASS_DEPENDENCY(DependenceInfo); |
Tobias Grosser | 4d96c8d | 2013-03-23 01:05:07 +0000 | [diff] [blame] | 525 | INITIALIZE_PASS_DEPENDENCY(ScopInfo); |
| 526 | INITIALIZE_PASS_END(IslScheduleOptimizer, "polly-opt-isl", |
| 527 | "Polly - Optimize schedule of SCoP", false, false) |