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

Tobias Grosser grosser at fim.uni-passau.de
Sun Oct 23 13:59:26 PDT 2011


Author: grosser
Date: Sun Oct 23 15:59:26 2011
New Revision: 142770

URL: http://llvm.org/viewvc/llvm-project?rev=142770&view=rev
Log:
ScheduleOptimizer: Allow to disable tiling

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=142770&r1=142769&r2=142770&view=diff
==============================================================================
--- polly/trunk/lib/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/ScheduleOptimizer.cpp Sun Oct 23 15:59:26 2011
@@ -38,6 +38,11 @@
 using namespace polly;
 
 static cl::opt<bool>
+DisableTiling("polly-no-tiling",
+	  cl::desc("Disable tiling in the isl scheduler"), cl::Hidden,
+	  cl::init(false));
+
+static cl::opt<bool>
 Prevector("enable-schedule-prevector",
 	  cl::desc("Enable the prevectorization in the scheduler"), cl::Hidden,
 	  cl::value_desc("Prevectorization enabled"),
@@ -202,14 +207,17 @@
   isl_union_map *tileUnionMap;
 
   partialSchedule = isl_band_get_partial_schedule(band);
-  ctx = isl_union_map_get_ctx(partialSchedule);
-  Space= isl_union_map_get_space(partialSchedule);
-  scheduleDimensions = isl_band_n_member(band);
-
-  tileMap = getTileMap(ctx, scheduleDimensions, Space);
-  tileUnionMap = isl_union_map_from_map(isl_map_from_basic_map(tileMap));
-  tileUnionMap = isl_union_map_align_params(tileUnionMap, Space);
-  partialSchedule = isl_union_map_apply_range(partialSchedule, tileUnionMap);
+
+  if (!DisableTiling) {
+    ctx = isl_union_map_get_ctx(partialSchedule);
+    Space= isl_union_map_get_space(partialSchedule);
+    scheduleDimensions = isl_band_n_member(band);
+
+    tileMap = getTileMap(ctx, scheduleDimensions, Space);
+    tileUnionMap = isl_union_map_from_map(isl_map_from_basic_map(tileMap));
+    tileUnionMap = isl_union_map_align_params(tileUnionMap, Space);
+    partialSchedule = isl_union_map_apply_range(partialSchedule, tileUnionMap);
+  }
 
   return partialSchedule;
 }





More information about the llvm-commits mailing list