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

Tobias Grosser grosser at fim.uni-passau.de
Mon Jan 30 11:38:54 PST 2012


Author: grosser
Date: Mon Jan 30 13:38:54 2012
New Revision: 149266

URL: http://llvm.org/viewvc/llvm-project?rev=149266&view=rev
Log:
Scheduling: Add option to disable schedule_maximise_band_depth

maximise_band_depth does not seem to have any effect for now, but it may help to
increase the amount of tileable loops. We expose the flag to be able to analyze
its effects when looking into individual benchmarks.

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=149266&r1=149265&r2=149266&view=diff
==============================================================================
--- polly/trunk/lib/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/ScheduleOptimizer.cpp Mon Jan 30 13:38:54 2012
@@ -61,6 +61,11 @@
                cl::desc("The fusion strategy to choose (min/max)"),
                cl::Hidden, cl::init("max"));
 
+static cl::opt<std::string>
+MaxizeBandDepth("polly-opt-maximize-bands",
+                cl::desc("Maxize the band depth (yes/no)"),
+                cl::Hidden, cl::init("yes"));
+
 namespace {
 
   class IslScheduleOptimizer : public ScopPass {
@@ -476,9 +481,21 @@
     IslFusionStrategy = ISL_SCHEDULE_FUSE_MAX;
   }
 
+  int IslMaximizeBands;
+
+  if (MaxizeBandDepth == "yes") {
+    IslMaximizeBands = 1;
+  } else if (MaxizeBandDepth == "no") {
+    IslMaximizeBands = 0;
+  } else {
+    errs() << "warning: Option -polly-opt-maximize-bands should either be 'yes'"
+              " or 'no'. Falling back to default: 'yes'\n";
+    IslMaximizeBands = 1;
+  }
+
   isl_options_set_schedule_fuse(S.getIslCtx(), IslFusionStrategy);
   isl_options_set_schedule_max_constant_term(S.getIslCtx(), CONSTANT_BOUND);
-  isl_options_set_schedule_maximize_band_depth(S.getIslCtx(), 1);
+  isl_options_set_schedule_maximize_band_depth(S.getIslCtx(), IslMaximizeBands);
 
   isl_options_set_on_error(S.getIslCtx(), ISL_ON_ERROR_CONTINUE);
   schedule  = isl_union_set_compute_schedule(domain, validity, proximity);





More information about the llvm-commits mailing list