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" |
| 21 | |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 22 | #include "polly/Cloog.h" |
| 23 | #include "polly/LinkAllPasses.h" |
Tobias Grosser | 67707b7 | 2011-10-23 20:59:40 +0000 | [diff] [blame] | 24 | #include "polly/CodeGeneration.h" |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 25 | #include "polly/Support/GICHelper.h" |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 26 | #include "polly/Dependences.h" |
| 27 | #include "polly/ScopInfo.h" |
| 28 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 29 | #include "isl/aff.h" |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 30 | #include "isl/space.h" |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 31 | #include "isl/map.h" |
| 32 | #include "isl/constraint.h" |
| 33 | #include "isl/schedule.h" |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 34 | #include "isl/band.h" |
Tobias Grosser | 42152ff | 2012-01-30 19:38:47 +0000 | [diff] [blame^] | 35 | #include "isl/options.h" |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 36 | |
Tobias Grosser | 4dca439 | 2011-11-22 19:40:19 +0000 | [diff] [blame] | 37 | #define DEBUG_TYPE "polly-opt-isl" |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 38 | #include "llvm/Support/Debug.h" |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 39 | #include "llvm/Support/CommandLine.h" |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 40 | |
Tobias Grosser | 768140c | 2011-12-14 08:58:39 +0000 | [diff] [blame] | 41 | static const int CONSTANT_BOUND = 20; |
| 42 | |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 43 | using namespace llvm; |
| 44 | using namespace polly; |
| 45 | |
Tobias Grosser | 967239c | 2011-10-23 20:59:44 +0000 | [diff] [blame] | 46 | namespace polly { |
| 47 | bool DisablePollyTiling; |
| 48 | } |
| 49 | static cl::opt<bool, true> |
Tobias Grosser | 353a268 | 2011-10-23 20:59:26 +0000 | [diff] [blame] | 50 | DisableTiling("polly-no-tiling", |
Tobias Grosser | 967239c | 2011-10-23 20:59:44 +0000 | [diff] [blame] | 51 | cl::desc("Disable tiling in the scheduler"), cl::Hidden, |
| 52 | cl::location(polly::DisablePollyTiling), cl::init(false)); |
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> |
| 55 | SimplifyDeps("polly-opt-simplify-deps", |
| 56 | cl::desc("Dependences should be simplified (yes/no)"), |
| 57 | cl::Hidden, cl::init("yes")); |
| 58 | |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 59 | namespace { |
| 60 | |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 61 | class IslScheduleOptimizer : public ScopPass { |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 62 | |
| 63 | public: |
| 64 | static char ID; |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 65 | explicit IslScheduleOptimizer() : ScopPass(ID) {} |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 66 | |
| 67 | virtual bool runOnScop(Scop &S); |
| 68 | void printScop(llvm::raw_ostream &OS) const; |
| 69 | void getAnalysisUsage(AnalysisUsage &AU) const; |
| 70 | }; |
| 71 | |
| 72 | } |
| 73 | |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 74 | char IslScheduleOptimizer::ID = 0; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 75 | |
| 76 | static int getSingleMap(__isl_take isl_map *map, void *user) { |
| 77 | isl_map **singleMap = (isl_map **) user; |
| 78 | *singleMap = map; |
| 79 | |
| 80 | return 0; |
| 81 | } |
| 82 | |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 83 | static void extendScattering(Scop &S, unsigned NewDimensions) { |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 84 | for (Scop::iterator SI = S.begin(), SE = S.end(); SI != SE; ++SI) { |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 85 | ScopStmt *Stmt = *SI; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 86 | |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 87 | if (Stmt->isFinalRead()) |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 88 | continue; |
| 89 | |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 90 | unsigned OldDimensions = Stmt->getNumScattering(); |
| 91 | isl_space *Space; |
| 92 | isl_basic_map *ChangeScattering; |
| 93 | |
| 94 | Space = isl_space_alloc(Stmt->getIslCtx(), 0, OldDimensions, NewDimensions); |
| 95 | ChangeScattering = isl_basic_map_universe(isl_space_copy(Space)); |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 96 | isl_local_space *LocalSpace = isl_local_space_from_space(Space); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 97 | |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 98 | for (unsigned i = 0; i < OldDimensions; i++) { |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 99 | isl_constraint *c = isl_equality_alloc(isl_local_space_copy(LocalSpace)); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 100 | isl_constraint_set_coefficient_si(c, isl_dim_in, i, 1); |
| 101 | isl_constraint_set_coefficient_si(c, isl_dim_out, i, -1); |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 102 | ChangeScattering = isl_basic_map_add_constraint(ChangeScattering, c); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 103 | } |
| 104 | |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 105 | for (unsigned i = OldDimensions; i < NewDimensions; i++) { |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 106 | isl_constraint *c = isl_equality_alloc(isl_local_space_copy(LocalSpace)); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 107 | isl_constraint_set_coefficient_si(c, isl_dim_out, i, 1); |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 108 | ChangeScattering = isl_basic_map_add_constraint(ChangeScattering, c); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 109 | } |
| 110 | |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 111 | isl_map *ChangeScatteringMap = isl_map_from_basic_map(ChangeScattering); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 112 | |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 113 | ChangeScatteringMap = isl_map_align_params(ChangeScatteringMap, |
| 114 | S.getParamSpace()); |
| 115 | isl_map *NewScattering = isl_map_apply_range(Stmt->getScattering(), |
| 116 | ChangeScatteringMap); |
| 117 | Stmt->setScattering(NewScattering); |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 118 | isl_local_space_free(LocalSpace); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 119 | } |
| 120 | } |
| 121 | |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 122 | // getTileMap - Create a map that describes a n-dimensonal tiling. |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 123 | // |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 124 | // getTileMap creates a map from a n-dimensional scattering space into an |
| 125 | // 2*n-dimensional scattering space. The map describes a rectangular tiling. |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 126 | // |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 127 | // Example: |
| 128 | // scheduleDimensions = 2, parameterDimensions = 1, tileSize = 32 |
| 129 | // |
| 130 | // tileMap := [p0] -> {[s0, s1] -> [t0, t1, s0, s1]: |
| 131 | // t0 % 32 = 0 and t0 <= s0 < t0 + 32 and |
| 132 | // t1 % 32 = 0 and t1 <= s1 < t1 + 32} |
| 133 | // |
| 134 | // Before tiling: |
| 135 | // |
| 136 | // for (i = 0; i < N; i++) |
| 137 | // for (j = 0; j < M; j++) |
| 138 | // S(i,j) |
| 139 | // |
| 140 | // After tiling: |
| 141 | // |
| 142 | // for (t_i = 0; t_i < N; i+=32) |
| 143 | // for (t_j = 0; t_j < M; j+=32) |
| 144 | // for (i = t_i; i < min(t_i + 32, N); i++) | Unknown that N % 32 = 0 |
| 145 | // for (j = t_j; j < t_j + 32; j++) | Known that M % 32 = 0 |
| 146 | // S(i,j) |
| 147 | // |
| 148 | static isl_basic_map *getTileMap(isl_ctx *ctx, int scheduleDimensions, |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 149 | isl_space *SpaceModel, int tileSize = 32) { |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 150 | // We construct |
| 151 | // |
| 152 | // tileMap := [p0] -> {[s0, s1] -> [t0, t1, p0, p1, a0, a1]: |
| 153 | // s0 = a0 * 32 and s0 = p0 and t0 <= p0 < t0 + 32 and |
| 154 | // s1 = a1 * 32 and s1 = p1 and t1 <= p1 < t1 + 32} |
| 155 | // |
| 156 | // and project out the auxilary dimensions a0 and a1. |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 157 | isl_space *Space = isl_space_alloc(ctx, 0, scheduleDimensions, |
| 158 | scheduleDimensions * 3); |
| 159 | isl_basic_map *tileMap = isl_basic_map_universe(isl_space_copy(Space)); |
| 160 | |
| 161 | isl_local_space *LocalSpace = isl_local_space_from_space(Space); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 162 | |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 163 | for (int x = 0; x < scheduleDimensions; x++) { |
| 164 | int sX = x; |
| 165 | int tX = x; |
| 166 | int pX = scheduleDimensions + x; |
| 167 | int aX = 2 * scheduleDimensions + x; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 168 | |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 169 | isl_constraint *c; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 170 | |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 171 | // sX = aX * tileSize; |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 172 | c = isl_equality_alloc(isl_local_space_copy(LocalSpace)); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 173 | isl_constraint_set_coefficient_si(c, isl_dim_out, sX, 1); |
| 174 | isl_constraint_set_coefficient_si(c, isl_dim_out, aX, -tileSize); |
| 175 | tileMap = isl_basic_map_add_constraint(tileMap, c); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 176 | |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 177 | // pX = sX; |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 178 | c = isl_equality_alloc(isl_local_space_copy(LocalSpace)); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 179 | isl_constraint_set_coefficient_si(c, isl_dim_out, pX, 1); |
| 180 | isl_constraint_set_coefficient_si(c, isl_dim_in, sX, -1); |
| 181 | tileMap = isl_basic_map_add_constraint(tileMap, c); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 182 | |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 183 | // tX <= pX |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 184 | c = isl_inequality_alloc(isl_local_space_copy(LocalSpace)); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 185 | isl_constraint_set_coefficient_si(c, isl_dim_out, pX, 1); |
| 186 | isl_constraint_set_coefficient_si(c, isl_dim_out, tX, -1); |
| 187 | tileMap = isl_basic_map_add_constraint(tileMap, c); |
| 188 | |
| 189 | // pX <= tX + (tileSize - 1) |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 190 | c = isl_inequality_alloc(isl_local_space_copy(LocalSpace)); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 191 | isl_constraint_set_coefficient_si(c, isl_dim_out, tX, 1); |
| 192 | isl_constraint_set_coefficient_si(c, isl_dim_out, pX, -1); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 193 | isl_constraint_set_constant_si(c, tileSize - 1); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 194 | tileMap = isl_basic_map_add_constraint(tileMap, c); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 195 | } |
| 196 | |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 197 | // Project out auxilary dimensions. |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 198 | // |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 199 | // The auxilary dimensions are transformed into existentially quantified ones. |
| 200 | // This reduces the number of visible scattering dimensions and allows Cloog |
| 201 | // to produces better code. |
| 202 | tileMap = isl_basic_map_project_out(tileMap, isl_dim_out, |
| 203 | 2 * scheduleDimensions, |
| 204 | scheduleDimensions); |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 205 | isl_local_space_free(LocalSpace); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 206 | return tileMap; |
| 207 | } |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 208 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 209 | // getScheduleForBand - Get the schedule for this band. |
| 210 | // |
Tobias Grosser | b603339 | 2011-12-08 13:02:58 +0000 | [diff] [blame] | 211 | // Polly applies transformations like tiling on top of the isl calculated value. |
| 212 | // This can influence the number of scheduling dimension. The number of |
| 213 | // schedule dimensions is returned in the parameter 'Dimension'. |
| 214 | isl_union_map *getScheduleForBand(isl_band *Band, int *Dimensions) { |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 215 | isl_union_map *PartialSchedule; |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 216 | isl_ctx *ctx; |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 217 | isl_space *Space; |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 218 | isl_basic_map *TileMap; |
| 219 | isl_union_map *TileUMap; |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 220 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 221 | PartialSchedule = isl_band_get_partial_schedule(Band); |
Tobias Grosser | b603339 | 2011-12-08 13:02:58 +0000 | [diff] [blame] | 222 | *Dimensions = isl_band_n_member(Band); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 223 | |
Tobias Grosser | 79b3020 | 2011-11-17 12:56:00 +0000 | [diff] [blame] | 224 | if (DisableTiling) |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 225 | return PartialSchedule; |
Tobias Grosser | 353a268 | 2011-10-23 20:59:26 +0000 | [diff] [blame] | 226 | |
Tobias Grosser | b603339 | 2011-12-08 13:02:58 +0000 | [diff] [blame] | 227 | // It does not make any sense to tile a band with just one dimension. |
| 228 | if (*Dimensions == 1) |
| 229 | return PartialSchedule; |
| 230 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 231 | ctx = isl_union_map_get_ctx(PartialSchedule); |
| 232 | Space = isl_union_map_get_space(PartialSchedule); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 233 | |
Tobias Grosser | b603339 | 2011-12-08 13:02:58 +0000 | [diff] [blame] | 234 | TileMap = getTileMap(ctx, *Dimensions, Space); |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 235 | TileUMap = isl_union_map_from_map(isl_map_from_basic_map(TileMap)); |
| 236 | TileUMap = isl_union_map_align_params(TileUMap, Space); |
Tobias Grosser | b603339 | 2011-12-08 13:02:58 +0000 | [diff] [blame] | 237 | *Dimensions = 2 * *Dimensions; |
| 238 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 239 | return isl_union_map_apply_range(PartialSchedule, TileUMap); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 240 | } |
| 241 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 242 | // Create a map that pre-vectorizes one scheduling dimension. |
| 243 | // |
| 244 | // getPrevectorMap creates a map that maps each input dimension to the same |
| 245 | // output dimension, except for the dimension DimToVectorize. DimToVectorize is |
| 246 | // strip mined by 'VectorWidth' and the newly created point loop of |
| 247 | // DimToVectorize is moved to the innermost level. |
| 248 | // |
| 249 | // Example (DimToVectorize=0, ScheduleDimensions=2, VectorWidth=4): |
| 250 | // |
| 251 | // | Before transformation |
| 252 | // | |
| 253 | // | A[i,j] -> [i,j] |
| 254 | // | |
| 255 | // | for (i = 0; i < 128; i++) |
| 256 | // | for (j = 0; j < 128; j++) |
| 257 | // | A(i,j); |
| 258 | // |
| 259 | // Prevector map: |
| 260 | // [i,j] -> [it,j,ip] : it % 4 = 0 and it <= ip <= it + 3 and i = ip |
| 261 | // |
| 262 | // | After transformation: |
| 263 | // | |
| 264 | // | A[i,j] -> [it,j,ip] : it % 4 = 0 and it <= ip <= it + 3 and i = ip |
| 265 | // | |
| 266 | // | for (it = 0; it < 128; it+=4) |
| 267 | // | for (j = 0; j < 128; j++) |
| 268 | // | for (ip = max(0,it); ip < min(128, it + 3); ip++) |
| 269 | // | A(ip,j); |
| 270 | // |
| 271 | // The goal of this transformation is to create a trivially vectorizable loop. |
| 272 | // This means a parallel loop at the innermost level that has a constant number |
| 273 | // of iterations corresponding to the target vector width. |
| 274 | // |
| 275 | // This transformation creates a loop at the innermost level. The loop has a |
| 276 | // constant number of iterations, if the number of loop iterations at |
| 277 | // DimToVectorize can be devided by VectorWidth. The default VectorWidth is |
| 278 | // currently constant and not yet target specific. This function does not reason |
| 279 | // about parallelism. |
| 280 | static isl_map *getPrevectorMap(isl_ctx *ctx, int DimToVectorize, |
| 281 | int ScheduleDimensions, |
| 282 | int VectorWidth = 4) { |
| 283 | isl_space *Space; |
| 284 | isl_local_space *LocalSpace, *LocalSpaceRange; |
| 285 | isl_set *Modulo; |
| 286 | isl_map *TilingMap; |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 287 | isl_constraint *c; |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 288 | isl_aff *Aff; |
| 289 | int PointDimension; /* ip */ |
| 290 | int TileDimension; /* it */ |
| 291 | isl_int VectorWidthMP; |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 292 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 293 | assert (0 <= DimToVectorize && DimToVectorize < ScheduleDimensions); |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 294 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 295 | Space = isl_space_alloc(ctx, 0, ScheduleDimensions, ScheduleDimensions + 1); |
| 296 | TilingMap = isl_map_universe(isl_space_copy(Space)); |
| 297 | LocalSpace = isl_local_space_from_space(Space); |
| 298 | PointDimension = ScheduleDimensions; |
| 299 | TileDimension = DimToVectorize; |
| 300 | |
| 301 | // Create an identity map for everything except DimToVectorize and map |
| 302 | // DimToVectorize to the point loop at the innermost dimension. |
| 303 | for (int i = 0; i < ScheduleDimensions; i++) { |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 304 | c = isl_equality_alloc(isl_local_space_copy(LocalSpace)); |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 305 | isl_constraint_set_coefficient_si(c, isl_dim_in, i, -1); |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 306 | |
| 307 | if (i == DimToVectorize) |
| 308 | isl_constraint_set_coefficient_si(c, isl_dim_out, PointDimension, 1); |
| 309 | else |
| 310 | isl_constraint_set_coefficient_si(c, isl_dim_out, i, 1); |
| 311 | |
| 312 | TilingMap = isl_map_add_constraint(TilingMap, c); |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 313 | } |
| 314 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 315 | // it % 'VectorWidth' = 0 |
| 316 | LocalSpaceRange = isl_local_space_range(isl_local_space_copy(LocalSpace)); |
| 317 | Aff = isl_aff_zero_on_domain(LocalSpaceRange); |
| 318 | Aff = isl_aff_set_constant_si(Aff, VectorWidth); |
| 319 | Aff = isl_aff_set_coefficient_si(Aff, isl_dim_in, TileDimension, 1); |
| 320 | isl_int_init(VectorWidthMP); |
| 321 | isl_int_set_si(VectorWidthMP, VectorWidth); |
| 322 | Aff = isl_aff_mod(Aff, VectorWidthMP); |
| 323 | isl_int_clear(VectorWidthMP); |
| 324 | Modulo = isl_pw_aff_zero_set(isl_pw_aff_from_aff(Aff)); |
| 325 | TilingMap = isl_map_intersect_range(TilingMap, Modulo); |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 326 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 327 | // it <= ip |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 328 | c = isl_inequality_alloc(isl_local_space_copy(LocalSpace)); |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 329 | isl_constraint_set_coefficient_si(c, isl_dim_out, TileDimension, -1); |
| 330 | isl_constraint_set_coefficient_si(c, isl_dim_out, PointDimension, 1); |
| 331 | TilingMap = isl_map_add_constraint(TilingMap, c); |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 332 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 333 | // ip <= it + ('VectorWidth' - 1) |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 334 | c = isl_inequality_alloc(LocalSpace); |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 335 | isl_constraint_set_coefficient_si(c, isl_dim_out, TileDimension, 1); |
| 336 | isl_constraint_set_coefficient_si(c, isl_dim_out, PointDimension, -1); |
| 337 | isl_constraint_set_constant_si(c, VectorWidth - 1); |
| 338 | TilingMap = isl_map_add_constraint(TilingMap, c); |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 339 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 340 | isl_map_dump(TilingMap); |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 341 | |
Tobias Grosser | 2493e92 | 2011-12-07 07:42:57 +0000 | [diff] [blame] | 342 | return TilingMap; |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 343 | } |
| 344 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 345 | // getScheduleForBandList - Get the scheduling map for a list of bands. |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 346 | // |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 347 | // We walk recursively the forest of bands to combine the schedules of the |
| 348 | // individual bands to the overall schedule. In case tiling is requested, |
| 349 | // the individual bands are tiled. |
| 350 | static isl_union_map *getScheduleForBandList(isl_band_list *BandList) { |
| 351 | int NumBands; |
| 352 | isl_union_map *Schedule; |
| 353 | isl_ctx *ctx; |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 354 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 355 | ctx = isl_band_list_get_ctx(BandList); |
| 356 | NumBands = isl_band_list_n_band(BandList); |
Tobias Grosser | 6287201 | 2011-11-17 12:56:04 +0000 | [diff] [blame] | 357 | Schedule = isl_union_map_empty(isl_space_params_alloc(ctx, 0)); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 358 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 359 | for (int i = 0; i < NumBands; i++) { |
| 360 | isl_band *Band; |
| 361 | isl_union_map *PartialSchedule; |
| 362 | int ScheduleDimensions; |
| 363 | isl_space *Space; |
Tobias Grosser | 44f19ac | 2011-07-05 22:15:53 +0000 | [diff] [blame] | 364 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 365 | Band = isl_band_list_get_band(BandList, i); |
Tobias Grosser | b603339 | 2011-12-08 13:02:58 +0000 | [diff] [blame] | 366 | PartialSchedule = getScheduleForBand(Band, &ScheduleDimensions); |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 367 | Space = isl_union_map_get_space(PartialSchedule); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 368 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 369 | if (isl_band_has_children(Band)) { |
| 370 | isl_band_list *Children; |
| 371 | isl_union_map *SuffixSchedule; |
| 372 | |
| 373 | Children = isl_band_get_children(Band); |
| 374 | SuffixSchedule = getScheduleForBandList(Children); |
| 375 | PartialSchedule = isl_union_map_flat_range_product(PartialSchedule, |
| 376 | SuffixSchedule); |
| 377 | isl_band_list_free(Children); |
Tobias Grosser | 67707b7 | 2011-10-23 20:59:40 +0000 | [diff] [blame] | 378 | } else if (EnablePollyVector) { |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 379 | for (int i = ScheduleDimensions - 1 ; i >= 0 ; i--) { |
| 380 | if (isl_band_member_is_zero_distance(Band, i)) { |
| 381 | isl_map *TileMap; |
| 382 | isl_union_map *TileUMap; |
Tobias Grosser | c6699b7 | 2011-06-30 20:29:13 +0000 | [diff] [blame] | 383 | |
Tobias Grosser | b603339 | 2011-12-08 13:02:58 +0000 | [diff] [blame] | 384 | TileMap = getPrevectorMap(ctx, i, ScheduleDimensions); |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 385 | TileUMap = isl_union_map_from_map(TileMap); |
| 386 | TileUMap = isl_union_map_align_params(TileUMap, |
| 387 | isl_space_copy(Space)); |
| 388 | PartialSchedule = isl_union_map_apply_range(PartialSchedule, |
| 389 | TileUMap); |
Tobias Grosser | 7c5ba83 | 2011-06-30 20:29:20 +0000 | [diff] [blame] | 390 | break; |
| 391 | } |
| 392 | } |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 393 | } |
| 394 | |
Tobias Grosser | 6287201 | 2011-11-17 12:56:04 +0000 | [diff] [blame] | 395 | Schedule = isl_union_map_union(Schedule, PartialSchedule); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 396 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 397 | isl_band_free(Band); |
Tobias Grosser | f533880 | 2011-10-06 00:03:35 +0000 | [diff] [blame] | 398 | isl_space_free(Space); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 399 | } |
| 400 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 401 | return Schedule; |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 402 | } |
| 403 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 404 | static isl_union_map *getScheduleMap(isl_schedule *Schedule) { |
| 405 | isl_band_list *BandList = isl_schedule_get_band_forest(Schedule); |
| 406 | isl_union_map *ScheduleMap = getScheduleForBandList(BandList); |
| 407 | isl_band_list_free(BandList); |
| 408 | return ScheduleMap; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 409 | } |
| 410 | |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 411 | bool IslScheduleOptimizer::runOnScop(Scop &S) { |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 412 | Dependences *D = &getAnalysis<Dependences>(); |
| 413 | |
| 414 | // Build input data. |
| 415 | int dependencyKinds = Dependences::TYPE_RAW |
| 416 | | Dependences::TYPE_WAR |
| 417 | | Dependences::TYPE_WAW; |
| 418 | |
Tobias Grosser | a26db47 | 2012-01-30 19:38:43 +0000 | [diff] [blame] | 419 | isl_union_map *dependences = D->getDependences(dependencyKinds); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 420 | isl_union_set *domain = NULL; |
| 421 | |
| 422 | for (Scop::iterator SI = S.begin(), SE = S.end(); SI != SE; ++SI) |
| 423 | if ((*SI)->isFinalRead()) |
| 424 | continue; |
| 425 | else if (!domain) |
| 426 | domain = isl_union_set_from_set((*SI)->getDomain()); |
| 427 | else |
| 428 | domain = isl_union_set_union(domain, |
| 429 | isl_union_set_from_set((*SI)->getDomain())); |
| 430 | |
| 431 | if (!domain) |
| 432 | return false; |
| 433 | |
Tobias Grosser | a26db47 | 2012-01-30 19:38:43 +0000 | [diff] [blame] | 434 | // Simplify the dependences by removing the constraints introduced by the |
| 435 | // domains. This can speed up the scheduling time significantly, as large |
| 436 | // constant coefficients will be removed from the dependences. The |
| 437 | // introduction of some additional dependences reduces the possible |
| 438 | // transformations, but in most cases, such transformation do not seem to be |
| 439 | // interesting anyway. In some cases this option may stop the scheduler to |
| 440 | // find any schedule. |
| 441 | if (SimplifyDeps == "yes") { |
| 442 | dependences = isl_union_map_gist_domain(dependences, |
| 443 | isl_union_set_copy(domain)); |
| 444 | dependences = isl_union_map_gist_range(dependences, |
| 445 | isl_union_set_copy(domain)); |
| 446 | } else if (SimplifyDeps != "no") { |
| 447 | errs() << "warning: Option -polly-opt-simplify-deps should either be 'yes' " |
| 448 | "or 'no'. Falling back to default: 'yes'\n"; |
| 449 | } |
| 450 | |
| 451 | isl_schedule *schedule; |
| 452 | isl_union_map *proximity = isl_union_map_copy(dependences); |
| 453 | isl_union_map *validity = dependences; |
| 454 | |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 455 | DEBUG(dbgs() << "\n\nCompute schedule from: "); |
| 456 | DEBUG(dbgs() << "Domain := "; isl_union_set_dump(domain); dbgs() << ";\n"); |
| 457 | DEBUG(dbgs() << "Proximity := "; isl_union_map_dump(proximity); |
| 458 | dbgs() << ";\n"); |
| 459 | DEBUG(dbgs() << "Validity := "; isl_union_map_dump(validity); |
| 460 | dbgs() << ";\n"); |
| 461 | |
Tobias Grosser | 768140c | 2011-12-14 08:58:39 +0000 | [diff] [blame] | 462 | isl_options_set_schedule_max_constant_term(S.getIslCtx(), CONSTANT_BOUND); |
Tobias Grosser | f4bea39 | 2011-12-14 08:58:43 +0000 | [diff] [blame] | 463 | isl_options_set_schedule_maximize_band_depth(S.getIslCtx(), 1); |
Tobias Grosser | 42152ff | 2012-01-30 19:38:47 +0000 | [diff] [blame^] | 464 | |
| 465 | isl_options_set_on_error(S.getIslCtx(), ISL_ON_ERROR_CONTINUE); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 466 | schedule = isl_union_set_compute_schedule(domain, validity, proximity); |
Tobias Grosser | 42152ff | 2012-01-30 19:38:47 +0000 | [diff] [blame^] | 467 | isl_options_set_on_error(S.getIslCtx(), ISL_ON_ERROR_ABORT); |
| 468 | |
| 469 | // In cases the scheduler is not able to optimize the code, we just do not |
| 470 | // touch the schedule. |
| 471 | if (!schedule) |
| 472 | return false; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 473 | |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 474 | DEBUG(dbgs() << "Computed schedule: "); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 475 | DEBUG(dbgs() << stringFromIslObj(schedule)); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 476 | DEBUG(dbgs() << "Individual bands: "); |
| 477 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 478 | isl_union_map *ScheduleMap = getScheduleMap(schedule); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 479 | |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 480 | for (Scop::iterator SI = S.begin(), SE = S.end(); SI != SE; ++SI) { |
| 481 | ScopStmt *stmt = *SI; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 482 | |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 483 | if (stmt->isFinalRead()) |
| 484 | continue; |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 485 | |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 486 | isl_set *domain = stmt->getDomain(); |
| 487 | isl_union_map *stmtBand; |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 488 | stmtBand = isl_union_map_intersect_domain(isl_union_map_copy(ScheduleMap), |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 489 | isl_union_set_from_set(domain)); |
| 490 | isl_map *stmtSchedule; |
| 491 | isl_union_map_foreach_map(stmtBand, getSingleMap, &stmtSchedule); |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 492 | stmt->setScattering(stmtSchedule); |
Tobias Grosser | 6e0fdca | 2011-08-23 12:31:14 +0000 | [diff] [blame] | 493 | isl_union_map_free(stmtBand); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 494 | } |
| 495 | |
Tobias Grosser | 1ae9a60 | 2011-11-17 12:56:03 +0000 | [diff] [blame] | 496 | isl_union_map_free(ScheduleMap); |
Tobias Grosser | de68cc9 | 2011-06-30 20:01:02 +0000 | [diff] [blame] | 497 | isl_schedule_free(schedule); |
| 498 | |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 499 | unsigned maxScatDims = 0; |
| 500 | |
| 501 | for (Scop::iterator SI = S.begin(), SE = S.end(); SI != SE; ++SI) |
Tobias Grosser | cf3942d | 2011-10-06 00:04:05 +0000 | [diff] [blame] | 502 | maxScatDims = std::max((*SI)->getNumScattering(), maxScatDims); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 503 | |
| 504 | extendScattering(S, maxScatDims); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 505 | return false; |
| 506 | } |
| 507 | |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 508 | void IslScheduleOptimizer::printScop(raw_ostream &OS) const { |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 509 | } |
| 510 | |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 511 | void IslScheduleOptimizer::getAnalysisUsage(AnalysisUsage &AU) const { |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 512 | ScopPass::getAnalysisUsage(AU); |
| 513 | AU.addRequired<Dependences>(); |
| 514 | } |
| 515 | |
Tobias Grosser | 4dca439 | 2011-11-22 19:40:19 +0000 | [diff] [blame] | 516 | INITIALIZE_PASS_BEGIN(IslScheduleOptimizer, "polly-opt-isl", |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 517 | "Polly - Optimize schedule of SCoP", false, false) |
| 518 | INITIALIZE_PASS_DEPENDENCY(Dependences) |
| 519 | INITIALIZE_PASS_DEPENDENCY(ScopInfo) |
Tobias Grosser | 4dca439 | 2011-11-22 19:40:19 +0000 | [diff] [blame] | 520 | INITIALIZE_PASS_END(IslScheduleOptimizer, "polly-opt-isl", |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 521 | "Polly - Optimize schedule of SCoP", false, false) |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 522 | |
Tobias Grosser | 73600b8 | 2011-10-08 00:30:40 +0000 | [diff] [blame] | 523 | Pass* polly::createIslScheduleOptimizerPass() { |
| 524 | return new IslScheduleOptimizer(); |
Tobias Grosser | 30aa24c | 2011-05-14 19:02:06 +0000 | [diff] [blame] | 525 | } |