[llvm-commits] [polly] r145071 - in /polly/trunk: lib/Analysis/ScopDetection.cpp lib/Pocc.cpp lib/RegisterPasses.cpp lib/ScheduleOptimizer.cpp test/ScheduleOptimizer/2011-08-25-crash_in_vectorizer.ll www/documentation/passes.html

Tobias Grosser grosser at fim.uni-passau.de
Tue Nov 22 11:40:19 PST 2011


Author: grosser
Date: Tue Nov 22 13:40:19 2011
New Revision: 145071

URL: http://llvm.org/viewvc/llvm-project?rev=145071&view=rev
Log:
Register Passes: Use -polly-optimizer=(isl|pocc) to switch optimizers

This replaces the old option -polly-use-pocc. Also call the passes uniformly
-polly-opt-pocc and -polly-opt-isl.

Modified:
    polly/trunk/lib/Analysis/ScopDetection.cpp
    polly/trunk/lib/Pocc.cpp
    polly/trunk/lib/RegisterPasses.cpp
    polly/trunk/lib/ScheduleOptimizer.cpp
    polly/trunk/test/ScheduleOptimizer/2011-08-25-crash_in_vectorizer.ll
    polly/trunk/www/documentation/passes.html

Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=145071&r1=145070&r2=145071&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Tue Nov 22 13:40:19 2011
@@ -268,7 +268,8 @@
   // disable this check to not cause irrelevant verification failures.
   if (!AS.isMustAlias() && !IgnoreAliasing)
     INVALID_NOVERIFY(Alias,
-                     "Possible aliasing found for value: " << *BaseValue);
+                     "Possible aliasing for value: " << BaseValue->getName()
+                     << "\n");
 
   return true;
 }

Modified: polly/trunk/lib/Pocc.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Pocc.cpp?rev=145071&r1=145070&r2=145071&view=diff
==============================================================================
--- polly/trunk/lib/Pocc.cpp (original)
+++ polly/trunk/lib/Pocc.cpp Tue Nov 22 13:40:19 2011
@@ -274,11 +274,11 @@
   AU.addRequired<Dependences>();
 }
 
-INITIALIZE_PASS_BEGIN(Pocc, "polly-optimize",
-                    "Polly - Optimize the scop using pocc", false, false)
+INITIALIZE_PASS_BEGIN(Pocc, "polly-opt-pocc",
+                      "Polly - Optimize the scop using pocc", false, false)
 INITIALIZE_PASS_DEPENDENCY(Dependences)
 INITIALIZE_PASS_DEPENDENCY(ScopInfo)
-INITIALIZE_PASS_END(Pocc, "polly-optimize",
+INITIALIZE_PASS_END(Pocc, "polly-opt-pocc",
                     "Polly - Optimize the scop using pocc", false, false)
 
 Pass* polly::createPoccPass() {

Modified: polly/trunk/lib/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/RegisterPasses.cpp?rev=145071&r1=145070&r2=145071&view=diff
==============================================================================
--- polly/trunk/lib/RegisterPasses.cpp (original)
+++ polly/trunk/lib/RegisterPasses.cpp Tue Nov 22 13:40:19 2011
@@ -26,6 +26,8 @@
 #include "polly/ScopInfo.h"
 #include "polly/TempScopInfo.h"
 
+#include <string>
+
 using namespace llvm;
 
 static cl::opt<bool>
@@ -40,10 +42,11 @@
 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<std::string>
+Optimizer("polly-optimizer",
+          cl::desc("Select the scheduling optimizer. " 
+                   "Either isl (default) or pocc."),
+          cl::Hidden, cl::init("isl"));
 static cl::opt<bool>
 ImportJScop("polly-run-import-jscop",
             cl::desc("Export the JScop description of the detected Scops"),
@@ -113,10 +116,6 @@
     PollyEnabled = true;
 
   if (!PollyEnabled) {
-    if (UsePocc)
-      errs() << "The option -polly-use-pocc has no effect. "
-                "Polly was not enabled\n";
-
     if (DisableCodegen)
       errs() << "The option -polly-no-codegen has no effect. "
                 "Polly was not enabled\n";
@@ -183,16 +182,20 @@
     PM.add(polly::createJSONImporterPass());
 
   if (RunScheduler) {
-    if (UsePocc) {
+    if (Optimizer == "pocc") {
 #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";
+                "required to run PoCC, PoCC is also not available. Falling "
+                "back to the isl optimizer.\n";
       PM.add(polly::createIslScheduleOptimizerPass());
 #endif
+    } else if (Optimizer == "isl") {
+      PM.add(polly::createIslScheduleOptimizerPass());
     } else {
+      errs() << "Invalid optimizer. Only 'isl' and 'pocc' allowed. "
+                "Falling back to 'isl'.\n";
       PM.add(polly::createIslScheduleOptimizerPass());
     }
   }

Modified: polly/trunk/lib/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/ScheduleOptimizer.cpp?rev=145071&r1=145070&r2=145071&view=diff
==============================================================================
--- polly/trunk/lib/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/ScheduleOptimizer.cpp Tue Nov 22 13:40:19 2011
@@ -32,7 +32,7 @@
 #include "isl/schedule.h"
 #include "isl/band.h"
 
-#define DEBUG_TYPE "polly-optimize-isl"
+#define DEBUG_TYPE "polly-opt-isl"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/CommandLine.h"
 
@@ -432,11 +432,11 @@
   AU.addRequired<Dependences>();
 }
 
-INITIALIZE_PASS_BEGIN(IslScheduleOptimizer, "polly-optimize-isl",
+INITIALIZE_PASS_BEGIN(IslScheduleOptimizer, "polly-opt-isl",
                       "Polly - Optimize schedule of SCoP", false, false)
 INITIALIZE_PASS_DEPENDENCY(Dependences)
 INITIALIZE_PASS_DEPENDENCY(ScopInfo)
-INITIALIZE_PASS_END(IslScheduleOptimizer, "polly-optimize-isl",
+INITIALIZE_PASS_END(IslScheduleOptimizer, "polly-opt-isl",
                       "Polly - Optimize schedule of SCoP", false, false)
 
 Pass* polly::createIslScheduleOptimizerPass() {

Modified: polly/trunk/test/ScheduleOptimizer/2011-08-25-crash_in_vectorizer.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScheduleOptimizer/2011-08-25-crash_in_vectorizer.ll?rev=145071&r1=145070&r2=145071&view=diff
==============================================================================
--- polly/trunk/test/ScheduleOptimizer/2011-08-25-crash_in_vectorizer.ll (original)
+++ polly/trunk/test/ScheduleOptimizer/2011-08-25-crash_in_vectorizer.ll Tue Nov 22 13:40:19 2011
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-optimize-isl -polly-cloog -analyze %s -S | FileCheck %s
-; RUN: opt %loadPolly -polly-optimize-isl -polly-cloog -analyze -enable-polly-vector %s -S | FileCheck %s -check-prefix=VECTOR
+; RUN: opt %loadPolly -polly-opt-isl -polly-cloog -analyze %s -S | FileCheck %s
+; RUN: opt %loadPolly -polly-opt-isl -polly-cloog -analyze -enable-polly-vector %s -S | FileCheck %s -check-prefix=VECTOR
 
 
 target datalayout =

Modified: polly/trunk/www/documentation/passes.html
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/www/documentation/passes.html?rev=145071&r1=145070&r2=145071&view=diff
==============================================================================
--- polly/trunk/www/documentation/passes.html (original)
+++ polly/trunk/www/documentation/passes.html Tue Nov 22 13:40:19 2011
@@ -29,8 +29,8 @@
 <h2>Middle End</h2>
 <ul>
 <li><em>polly-dependences</em> Calculate the dependences in a SCoPs</li>
-<li><em>polly-interchange</em> Perform loop interchange (work in progress)</li>
-<li><em>polly-optimize</em> Optimize the SCoP using PoCC</li>
+<li><em>polly-opt-pocc</em> Optimize the SCoP using PoCC</li>
+<li><em>polly-opt-isl</em> Optimize the SCoP using isl</li>
 <li>Import/Export
 <ul>
 <li><em>polly-export-cloog</em> Export the CLooG input file





More information about the llvm-commits mailing list