diff options
author | Tobias Grosser <tobias@grosser.es> | 2015-04-27 15:02:33 +0300 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2015-04-27 15:02:33 +0300 |
commit | 8fd23900532e0575f72391054e1e77db319d2b86 (patch) | |
tree | 409155e0ca0c5b960aa4e51d10619de96237b302 /polly/lib | |
parent | a77ca519eaa64c503afa7a2002da95a831c08dbb (diff) |
Do not expose code generator choice in the header
There is no need for other passes to access the code-generator command-line
option. Hence, drop it from the header to simplify the interface.
llvm-svn: 235866
Diffstat (limited to 'polly/lib')
-rw-r--r-- | polly/lib/Support/RegisterPasses.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/polly/lib/Support/RegisterPasses.cpp b/polly/lib/Support/RegisterPasses.cpp index b3ffdb143aa9..4b33ed800bf9 100644 --- a/polly/lib/Support/RegisterPasses.cpp +++ b/polly/lib/Support/RegisterPasses.cpp @@ -59,14 +59,13 @@ static cl::opt<OptimizerChoice> Optimizer( cl::Hidden, cl::init(OPTIMIZER_ISL), cl::ZeroOrMore, cl::cat(PollyCategory)); -CodeGenChoice polly::PollyCodeGenChoice; -static cl::opt<CodeGenChoice, true> XCodeGenerator( +enum CodeGenChoice { CODEGEN_ISL, CODEGEN_NONE }; +static cl::opt<CodeGenChoice> CodeGenerator( "polly-code-generator", cl::desc("Select the code generator"), cl::values(clEnumValN(CODEGEN_ISL, "isl", "isl code generator"), clEnumValN(CODEGEN_NONE, "none", "no code generation"), clEnumValEnd), - cl::Hidden, cl::location(PollyCodeGenChoice), cl::init(CODEGEN_ISL), - cl::ZeroOrMore, cl::cat(PollyCategory)); + cl::Hidden, cl::init(CODEGEN_ISL), cl::ZeroOrMore, cl::cat(PollyCategory)); VectorizerChoice polly::PollyVectorizerChoice; static cl::opt<polly::VectorizerChoice, true> Vectorizer( @@ -204,7 +203,7 @@ void registerPollyPasses(llvm::legacy::PassManagerBase &PM) { if (ExportJScop) PM.add(polly::createJSONExporterPass()); - switch (PollyCodeGenChoice) { + switch (CodeGenerator) { case CODEGEN_ISL: PM.add(polly::createIslCodeGenerationPass()); break; |