[polly] r235866 - Do not expose code generator choice in the header
Tobias Grosser
tobias at grosser.es
Mon Apr 27 05:02:34 PDT 2015
Author: grosser
Date: Mon Apr 27 07:02:33 2015
New Revision: 235866
URL: http://llvm.org/viewvc/llvm-project?rev=235866&view=rev
Log:
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.
Modified:
polly/trunk/include/polly/CodeGen/CodeGeneration.h
polly/trunk/lib/Support/RegisterPasses.cpp
Modified: polly/trunk/include/polly/CodeGen/CodeGeneration.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/CodeGeneration.h?rev=235866&r1=235865&r2=235866&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/CodeGeneration.h (original)
+++ polly/trunk/include/polly/CodeGen/CodeGeneration.h Mon Apr 27 07:02:33 2015
@@ -24,9 +24,6 @@ enum VectorizerChoice {
VECTORIZER_POLLY,
};
extern VectorizerChoice PollyVectorizerChoice;
-
-enum CodeGenChoice { CODEGEN_ISL, CODEGEN_NONE };
-extern CodeGenChoice PollyCodeGenChoice;
}
#endif // POLLY_CODEGENERATION_H
Modified: polly/trunk/lib/Support/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/RegisterPasses.cpp?rev=235866&r1=235865&r2=235866&view=diff
==============================================================================
--- polly/trunk/lib/Support/RegisterPasses.cpp (original)
+++ polly/trunk/lib/Support/RegisterPasses.cpp Mon Apr 27 07:02:33 2015
@@ -59,14 +59,13 @@ static cl::opt<OptimizerChoice> Optimize
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::P
if (ExportJScop)
PM.add(polly::createJSONExporterPass());
- switch (PollyCodeGenChoice) {
+ switch (CodeGenerator) {
case CODEGEN_ISL:
PM.add(polly::createIslCodeGenerationPass());
break;
More information about the llvm-commits
mailing list