Add an option to run the PoCC optimizer

llvm-svn: 142773
This commit is contained in:
Tobias Grosser 2011-10-23 20:59:35 +00:00
parent 12dcc646d5
commit d5e80c5f9c
2 changed files with 26 additions and 2 deletions

View File

@ -37,6 +37,10 @@ DisableCodegen("polly-no-codegen",
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 @@ static void registerPollyPasses(const llvm::PassManagerBuilder &Builder,
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());

View File

@ -67,6 +67,13 @@ contain.
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>