diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 0b092c9d280b..b9d3b3551aa1 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -268,7 +268,8 @@ bool ScopDetection::isValidMemoryAccess(Instruction &Inst, // 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; } diff --git a/polly/lib/Pocc.cpp b/polly/lib/Pocc.cpp index 11d01f748924..6bed2e3663fe 100644 --- a/polly/lib/Pocc.cpp +++ b/polly/lib/Pocc.cpp @@ -274,11 +274,11 @@ void Pocc::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); } -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() { diff --git a/polly/lib/RegisterPasses.cpp b/polly/lib/RegisterPasses.cpp index eb7c10b95ce1..f763ce938ac1 100644 --- a/polly/lib/RegisterPasses.cpp +++ b/polly/lib/RegisterPasses.cpp @@ -26,6 +26,8 @@ #include "polly/ScopInfo.h" #include "polly/TempScopInfo.h" +#include + using namespace llvm; static cl::opt @@ -40,10 +42,11 @@ static cl::opt DisableCodegen("polly-no-codegen", cl::desc("Disable Polly Code Generation"), cl::Hidden, cl::init(false)); -static cl::opt -UsePocc("polly-use-pocc", - cl::desc("Use the PoCC optimizer instead of the one in isl"), cl::Hidden, - cl::init(false)); +static cl::opt +Optimizer("polly-optimizer", + cl::desc("Select the scheduling optimizer. " + "Either isl (default) or pocc."), + cl::Hidden, cl::init("isl")); static cl::opt ImportJScop("polly-run-import-jscop", cl::desc("Export the JScop description of the detected Scops"), @@ -113,10 +116,6 @@ static void registerPollyPasses(const llvm::PassManagerBuilder &Builder, 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 @@ static void registerPollyPasses(const llvm::PassManagerBuilder &Builder, 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()); } } diff --git a/polly/lib/ScheduleOptimizer.cpp b/polly/lib/ScheduleOptimizer.cpp index 21e2530f8970..d2beb03a695f 100644 --- a/polly/lib/ScheduleOptimizer.cpp +++ b/polly/lib/ScheduleOptimizer.cpp @@ -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 @@ void IslScheduleOptimizer::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); } -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() { diff --git a/polly/test/ScheduleOptimizer/2011-08-25-crash_in_vectorizer.ll b/polly/test/ScheduleOptimizer/2011-08-25-crash_in_vectorizer.ll index 11a9874f027f..52fe6cbef614 100644 --- a/polly/test/ScheduleOptimizer/2011-08-25-crash_in_vectorizer.ll +++ b/polly/test/ScheduleOptimizer/2011-08-25-crash_in_vectorizer.ll @@ -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 = diff --git a/polly/www/documentation/passes.html b/polly/www/documentation/passes.html index 5641cacf77c0..e40df2114084 100644 --- a/polly/www/documentation/passes.html +++ b/polly/www/documentation/passes.html @@ -29,8 +29,8 @@

Middle End

  • polly-dependences Calculate the dependences in a SCoPs
  • -
  • polly-interchange Perform loop interchange (work in progress)
  • -
  • polly-optimize Optimize the SCoP using PoCC
  • +
  • polly-opt-pocc Optimize the SCoP using PoCC
  • +
  • polly-opt-isl Optimize the SCoP using isl
  • Import/Export
    • polly-export-cloog Export the CLooG input file