[llvm-commits] [polly] r134187 - /polly/trunk/lib/ScheduleOptimizer.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Thu Jun 30 13:29:20 PDT 2011
Author: grosser
Date: Thu Jun 30 15:29:20 2011
New Revision: 134187
URL: http://llvm.org/viewvc/llvm-project?rev=134187&view=rev
Log:
ScheduleOpt: Prevectorize the innermost parallel loop
Only prevectorize loops that are actually parallel and can
be vectorized. Take the innermost loop that is eligible.
Modified:
polly/trunk/lib/ScheduleOptimizer.cpp
Modified: polly/trunk/lib/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/ScheduleOptimizer.cpp?rev=134187&r1=134186&r2=134187&view=diff
==============================================================================
--- polly/trunk/lib/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/ScheduleOptimizer.cpp Thu Jun 30 15:29:20 2011
@@ -299,13 +299,17 @@
int scheduleDimensions, parameterDimensions;
ctx = isl_union_map_get_ctx(partialSchedule);
- scheduleDimensions = isl_band_n_member(band);
- tileMap = getPrevectorMap(ctx, scheduleDimensions * 2 - 1,
- scheduleDimensions * 2,
- parameterDimensions);
- tileUnionMap = isl_union_map_from_map(tileMap);
- partialSchedule = isl_union_map_apply_range(partialSchedule,
- tileUnionMap);
+ for (int i = scheduleDimensions - 1 ; i >= 0 ; i--) {
+ if (isl_band_member_is_parallel(band, i)) {
+ tileMap = getPrevectorMap(ctx, scheduleDimensions + i,
+ scheduleDimensions * 2,
+ parameterDimensions);
+ tileUnionMap = isl_union_map_from_map(tileMap);
+ partialSchedule = isl_union_map_apply_range(partialSchedule,
+ tileUnionMap);
+ break;
+ }
+ }
}
if (finalSchedule)
More information about the llvm-commits
mailing list