[llvm-commits] [polly] r144901 - /polly/trunk/lib/RegisterPasses.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Thu Nov 17 04:56:07 PST 2011
Author: grosser
Date: Thu Nov 17 06:56:06 2011
New Revision: 144901
URL: http://llvm.org/viewvc/llvm-project?rev=144901&view=rev
Log:
RegisterPasses: Avoid double negation
Fix suggested by Sebastian Pop.
Modified:
polly/trunk/lib/RegisterPasses.cpp
Modified: polly/trunk/lib/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/RegisterPasses.cpp?rev=144901&r1=144900&r2=144901&view=diff
==============================================================================
--- polly/trunk/lib/RegisterPasses.cpp (original)
+++ polly/trunk/lib/RegisterPasses.cpp Thu Nov 17 06:56:06 2011
@@ -104,6 +104,9 @@
static void registerPollyPasses(const llvm::PassManagerBuilder &Builder,
llvm::PassManagerBase &PM) {
+ bool RunScheduler = !DisableScheduler;
+ bool RunCodegen = !DisableCodegen;
+
// Polly is only enabled at -O3
if (Builder.OptLevel != 3)
return;
@@ -150,10 +153,8 @@
if (ImportJScop)
PM.add(polly::createJSONImporterPass());
- if (!DisableScheduler) {
- if (!UsePocc)
- PM.add(polly::createIslScheduleOptimizerPass());
- else {
+ if (RunScheduler) {
+ if (UsePocc) {
#ifdef SCOPLIB_FOUND
PM.add(polly::createPoccPass());
#else
@@ -162,14 +163,15 @@
<< "back to the isl optimizer.\n";
PM.add(polly::createIslScheduleOptimizerPass());
#endif
+ } else {
+ PM.add(polly::createIslScheduleOptimizerPass());
}
}
if (ExportJScop)
PM.add(polly::createJSONExporterPass());
-
- if (!DisableCodegen)
+ if (RunCodegen)
PM.add(polly::createCodeGenerationPass());
}
More information about the llvm-commits
mailing list