[llvm-commits] [polly] r142773 - in /polly/trunk: lib/RegisterPasses.cpp www/example_load_Polly_into_clang.html
Tobias Grosser
grosser at fim.uni-passau.de
Sun Oct 23 13:59:35 PDT 2011
Author: grosser
Date: Sun Oct 23 15:59:35 2011
New Revision: 142773
URL: http://llvm.org/viewvc/llvm-project?rev=142773&view=rev
Log:
Add an option to run the PoCC optimizer
Modified:
polly/trunk/lib/RegisterPasses.cpp
polly/trunk/www/example_load_Polly_into_clang.html
Modified: polly/trunk/lib/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/RegisterPasses.cpp?rev=142773&r1=142772&r2=142773&view=diff
==============================================================================
--- polly/trunk/lib/RegisterPasses.cpp (original)
+++ polly/trunk/lib/RegisterPasses.cpp Sun Oct 23 15:59:35 2011
@@ -37,6 +37,10 @@
cl::desc("Disable Polly Code Generation"), cl::Hidden,
cl::init(false));
static cl::opt<bool>
+UsePocc("polly-use-pocc",
+ cl::desc("Use the PoCC optimizer instead of the one in isl"), cl::Hidden,
+ cl::init(false));
+static cl::opt<bool>
PollyViewer("polly-show",
cl::desc("Enable the Polly DOT viewer in -O3"), cl::Hidden,
cl::value_desc("Run the Polly DOT viewer at -O3"),
@@ -124,8 +128,21 @@
if (PollyOnlyPrinter)
PM.add(polly::createDOTOnlyPrinterPass());
- if (!DisableScheduler)
- PM.add(polly::createIslScheduleOptimizerPass());
+ if (!DisableScheduler) {
+ if (!UsePocc)
+ PM.add(polly::createIslScheduleOptimizerPass());
+ else {
+#ifdef SCOPLIB_FOUND
+ PM.add(polly::createPoccPass());
+#else
+ errs() << "Polly is compiled without scoplib support. As scoplib is "
+ << "required to run PoCC, PoCC is also not available. Falling "
+ << "back to the isl optimizer.\n";
+ PM.add(polly::createIslScheduleOptimizerPass());
+#endif
+ }
+
+ }
if (!DisableCodegen)
PM.add(polly::createCodeGenerationPass());
Modified: polly/trunk/www/example_load_Polly_into_clang.html
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/www/example_load_Polly_into_clang.html?rev=142773&r1=142772&r2=142773&view=diff
==============================================================================
--- polly/trunk/www/example_load_Polly_into_clang.html (original)
+++ polly/trunk/www/example_load_Polly_into_clang.html Sun Oct 23 15:59:35 2011
@@ -67,6 +67,13 @@
Polly automatically runs a polyhedral optimizer to optimize the schedules. To
disable it add the option '-polly-no-optimizer'.
+<h3>Use the PoCC optimizer</h3>
+Polly uses by default the isl scheduling optimizer, a new implementation of the
+well known Pluto algorithm. The main reason for the isl scheduler being the
+default is that it does not require any additional libraries or tools to be
+installed. As the new scheduler may still have some bugs and because being
+able to compare is good in general, it is possible to switch the used optimizer
+back to PoCC. For this add the option '-polly-use-pocc'.
</div>
</body>
More information about the llvm-commits
mailing list