diff options
| author | Tobias Grosser <tobias@grosser.es> | 2015-07-25 12:28:56 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2015-07-25 12:28:56 +0000 |
| commit | 3b10c94062e897bff2e3ecc6b53b6aaad0d84ac7 (patch) | |
| tree | e4e0a4487883e484f0491f5565bcc0281eb94199 /polly/lib/Transform | |
| parent | 9a9efbafa701f7c6a2c6732b4e8e2a4e0adc23e1 (diff) | |
| download | bcm5719-llvm-3b10c94062e897bff2e3ecc6b53b6aaad0d84ac7.tar.gz bcm5719-llvm-3b10c94062e897bff2e3ecc6b53b6aaad0d84ac7.zip | |
Prevectorize the schedule of the band (or the point loop in case of tiling)
Contributed-by: Roman Gareev <gareevroman@gmail.com>
llvm-svn: 243214
Diffstat (limited to 'polly/lib/Transform')
| -rw-r--r-- | polly/lib/Transform/ScheduleOptimizer.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp index 43ed2785095..5d8ac5a0922 100644 --- a/polly/lib/Transform/ScheduleOptimizer.cpp +++ b/polly/lib/Transform/ScheduleOptimizer.cpp @@ -169,7 +169,8 @@ private: /// - if the band is tileable /// - if the band has more than one loop dimension /// - /// - Prevectorize the point loop of the tile + /// - Prevectorize the schedule of the band (or the point loop in case of + /// tiling) /// - if vectorization is enabled /// /// @param Node The schedule node to (possibly) optimize. @@ -300,28 +301,29 @@ isl_schedule_node *IslScheduleOptimizer::optimizeBand(isl_schedule_node *Node, Res = Node; } else { Res = isl_schedule_node_band_tile(Node, Sizes); + Child = isl_schedule_node_get_child(Res, 0); + isl_schedule_node_free(Res); + Res = Child; } if (PollyVectorizerChoice == VECTORIZER_NONE) return Res; - Child = isl_schedule_node_get_child(Res, 0); - auto ChildSchedule = isl_schedule_node_band_get_partial_schedule(Child); + auto Schedule = isl_schedule_node_band_get_partial_schedule(Res); for (int i = Dims - 1; i >= 0; i--) { - if (isl_schedule_node_band_member_get_coincident(Child, i)) { + if (isl_schedule_node_band_member_get_coincident(Res, i)) { auto TileMap = IslScheduleOptimizer::getPrevectorMap(Ctx, i, Dims); auto TileUMap = isl_union_map_from_map(TileMap); - auto ChildSchedule2 = isl_union_map_apply_range( - isl_union_map_from_multi_union_pw_aff(ChildSchedule), TileUMap); - ChildSchedule = isl_multi_union_pw_aff_from_union_map(ChildSchedule2); + auto Schedule2 = isl_union_map_apply_range( + isl_union_map_from_multi_union_pw_aff(Schedule), TileUMap); + Schedule = isl_multi_union_pw_aff_from_union_map(Schedule2); break; } } - isl_schedule_node_free(Res); - Res = isl_schedule_node_delete(Child); - Res = isl_schedule_node_insert_partial_schedule(Res, ChildSchedule); + Res = isl_schedule_node_delete(Res); + Res = isl_schedule_node_insert_partial_schedule(Res, Schedule); return Res; } |

