[llvm-commits] [polly] r134448 - /polly/trunk/lib/ScheduleOptimizer.cpp

Tobias Grosser grosser at fim.uni-passau.de
Tue Jul 5 17:15:53 CDT 2011


Author: grosser
Date: Tue Jul  5 17:15:53 2011
New Revision: 134448

URL: http://llvm.org/viewvc/llvm-project?rev=134448&view=rev
Log:
ScheduleOpt: Fix some bugs

isl changed a function name, we did not properly initialize some variables
and we freed an isl_ctx object.

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=134448&r1=134447&r2=134448&view=diff
==============================================================================
--- polly/trunk/lib/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/ScheduleOptimizer.cpp Tue Jul  5 17:15:53 2011
@@ -205,7 +205,6 @@
   partialSchedule = isl_union_map_apply_range(partialSchedule, tileUnionMap);
 
   isl_dim_free(dim);
-  isl_ctx_free(ctx);
 
   return partialSchedule;
 }
@@ -286,6 +285,11 @@
     isl_union_map *partialSchedule;
     band = isl_band_list_get_band(blist, i);
     partialSchedule = getTiledPartialSchedule(band);
+    int scheduleDimensions = isl_band_n_member(band);
+    isl_dim *dim = isl_union_map_get_dim(partialSchedule);
+    int parameterDimensions = isl_dim_size(dim, isl_dim_param);
+    isl_dim_free(dim);
+
 
     if (isl_band_has_children(band)) {
       isl_band_list *children = isl_band_get_children(band);
@@ -296,11 +300,10 @@
       isl_map *tileMap;
       isl_union_map *tileUnionMap;
       isl_ctx *ctx;
-      int scheduleDimensions, parameterDimensions;
 
       ctx = isl_union_map_get_ctx(partialSchedule);
       for (int i = scheduleDimensions - 1 ;  i >= 0 ; i--) {
-	if (isl_band_member_is_parallel(band, i)) {
+	if (isl_band_member_is_zero_distance(band, i)) {
 	  tileMap = getPrevectorMap(ctx, scheduleDimensions + i,
 				    scheduleDimensions * 2,
 				    parameterDimensions);
@@ -313,7 +316,7 @@
     }
 
     if (finalSchedule)
-      isl_union_map_union(finalSchedule, partialSchedule);
+      finalSchedule = isl_union_map_union(finalSchedule, partialSchedule);
     else
       finalSchedule = partialSchedule;
 




More information about the llvm-commits mailing list