diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-05-07 07:31:10 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-05-07 07:31:10 +0000 |
commit | 637bd631237d5d08666341bf371a60af1c58ab96 (patch) | |
tree | 2a15cacc65175cd3effd678095056fd9889e62be /polly/lib/RegisterPasses.cpp | |
parent | e602a07662a5b64fbbeb9af916d29956d330ad47 (diff) | |
download | bcm5719-llvm-637bd631237d5d08666341bf371a60af1c58ab96.tar.gz bcm5719-llvm-637bd631237d5d08666341bf371a60af1c58ab96.zip |
Move polly options into separate option category
Use the new cl::OptionCategory support to move the Polly options into a separate
option category. The aim is to hide most options and show by default only the
options a user needs to influence '-O3 -polly'. The available options probably
need some care, but here is the current status:
Polly Options:
Configure the polly loop optimizer
-enable-polly-openmp - Generate OpenMP parallel code
-polly - Enable the polly optimizer (only at -O3)
-polly-no-tiling - Disable tiling in the scheduler
-polly-only-func=<function-name> - Only run on a single function
-polly-report - Print information about the activities
of Polly
-polly-vectorizer - Select the vectorization strategy
=none - No Vectorization
=polly - Polly internal vectorizer
=unroll-only - Only grouped unroll the vectorize
candidate loops
=bb - The Basic Block vectorizer driven by
Polly
llvm-svn: 181295
Diffstat (limited to 'polly/lib/RegisterPasses.cpp')
-rw-r--r-- | polly/lib/RegisterPasses.cpp | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/polly/lib/RegisterPasses.cpp b/polly/lib/RegisterPasses.cpp index 4ba084cf895..6c7d315c74d 100644 --- a/polly/lib/RegisterPasses.cpp +++ b/polly/lib/RegisterPasses.cpp @@ -26,22 +26,24 @@ #include "polly/CodeGen/Cloog.h" #include "polly/CodeGen/CodeGeneration.h" #include "polly/Dependences.h" +#include "polly/Options.h" #include "polly/ScopDetection.h" #include "polly/ScopInfo.h" #include "polly/TempScopInfo.h" #include "llvm/Analysis/CFGPrinter.h" #include "llvm/PassManager.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" #include "llvm/Transforms/Vectorize.h" using namespace llvm; +cl::OptionCategory PollyCategory("Polly Options", + "Configure the polly loop optimizer"); static cl::opt<bool> -PollyEnabled("polly", cl::desc("Enable the default passes of Polly in -O3"), - cl::init(false), cl::ZeroOrMore); +PollyEnabled("polly", cl::desc("Enable the polly optimizer (only at -O3)"), + cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); enum OptimizerChoice { OPTIMIZER_NONE, @@ -66,7 +68,8 @@ static cl::opt<OptimizerChoice> Optimizer( #endif clEnumValN(OPTIMIZER_ISL, "isl", "The isl scheduling optimizer"), clEnumValEnd), - cl::Hidden, cl::init(OPTIMIZER_ISL), cl::ZeroOrMore); + cl::Hidden, cl::init(OPTIMIZER_ISL), cl::ZeroOrMore, + cl::cat(PollyCategory)); enum CodeGenChoice { #ifdef CLOOG_FOUND @@ -90,11 +93,12 @@ static cl::opt<CodeGenChoice> CodeGenerator( #endif clEnumValN(CODEGEN_ISL, "isl", "isl code generator"), clEnumValN(CODEGEN_NONE, "none", "no code generation"), clEnumValEnd), - cl::Hidden, cl::init(DefaultCodeGen), cl::ZeroOrMore); + cl::Hidden, cl::init(DefaultCodeGen), cl::ZeroOrMore, + cl::cat(PollyCategory)); VectorizerChoice polly::PollyVectorizerChoice; static cl::opt<polly::VectorizerChoice, true> Vectorizer( - "polly-vectorizer", cl::desc("Select the scheduling optimizer"), + "polly-vectorizer", cl::desc("Select the vectorization strategy"), cl::values(clEnumValN(polly::VECTORIZER_NONE, "none", "No Vectorization"), clEnumValN(polly::VECTORIZER_POLLY, "polly", "Polly internal vectorizer"), @@ -103,44 +107,52 @@ static cl::opt<polly::VectorizerChoice, true> Vectorizer( clEnumValN(polly::VECTORIZER_BB, "bb", "The Basic Block vectorizer driven by Polly"), clEnumValEnd), - cl::Hidden, cl::location(PollyVectorizerChoice), - cl::init(polly::VECTORIZER_NONE), cl::ZeroOrMore); + cl::location(PollyVectorizerChoice), cl::init(polly::VECTORIZER_NONE), + cl::ZeroOrMore, cl::cat(PollyCategory)); static cl::opt<bool> ImportJScop("polly-import", cl::desc("Export the polyhedral description of the detected Scops"), - cl::Hidden, cl::init(false), cl::ZeroOrMore); + cl::Hidden, cl::init(false), cl::ZeroOrMore, + cl::cat(PollyCategory)); + static cl::opt<bool> ExportJScop("polly-export", cl::desc("Export the polyhedral description of the detected Scops"), - cl::Hidden, cl::init(false), cl::ZeroOrMore); + cl::Hidden, cl::init(false), cl::ZeroOrMore, + cl::cat(PollyCategory)); static cl::opt<bool> DeadCodeElim("polly-run-dce", cl::desc("Run the dead code elimination"), - cl::Hidden, cl::init(false), cl::ZeroOrMore); + cl::Hidden, cl::init(false), cl::ZeroOrMore, + cl::cat(PollyCategory)); 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"), - cl::init(false), cl::ZeroOrMore); + cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); + static cl::opt<bool> PollyOnlyViewer( "polly-show-only", cl::desc("Enable the Polly DOT viewer in -O3 (no BB content)"), cl::Hidden, cl::value_desc("Run the Polly DOT viewer at -O3 (no BB content"), - cl::init(false)); + cl::init(false), cl::cat(PollyCategory)); + static cl::opt<bool> PollyPrinter("polly-dot", cl::desc("Enable the Polly DOT printer in -O3"), cl::Hidden, cl::value_desc("Run the Polly DOT printer at -O3"), - cl::init(false)); + cl::init(false), cl::cat(PollyCategory)); + static cl::opt<bool> PollyOnlyPrinter( "polly-dot-only", cl::desc("Enable the Polly DOT printer in -O3 (no BB content)"), cl::Hidden, cl::value_desc("Run the Polly DOT printer at -O3 (no BB content"), - cl::init(false)); + cl::init(false), cl::cat(PollyCategory)); + static cl::opt<bool> CFGPrinter("polly-view-cfg", cl::desc("Show the Polly CFG right after code generation"), - cl::Hidden, cl::init(false)); + cl::Hidden, cl::init(false), cl::cat(PollyCategory)); namespace { static void initializePollyPasses(PassRegistry &Registry) { |