[polly] r275310 - PPCGCodegen: Support compilation without GPU support
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 12:52:24 PDT 2016
Author: grosser
Date: Wed Jul 13 14:52:24 2016
New Revision: 275310
URL: http://llvm.org/viewvc/llvm-project?rev=275310&view=rev
Log:
PPCGCodegen: Support compilation without GPU support
Modified:
polly/trunk/include/polly/LinkAllPasses.h
polly/trunk/lib/Support/RegisterPasses.cpp
Modified: polly/trunk/include/polly/LinkAllPasses.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/LinkAllPasses.h?rev=275310&r1=275309&r2=275310&view=diff
==============================================================================
--- polly/trunk/include/polly/LinkAllPasses.h (original)
+++ polly/trunk/include/polly/LinkAllPasses.h Wed Jul 13 14:52:24 2016
@@ -42,7 +42,9 @@ llvm::Pass *createScopInfoRegionPassPass
llvm::Pass *createScopInfoWrapperPassPass();
llvm::Pass *createIslAstInfoPass();
llvm::Pass *createCodeGenerationPass();
+#ifdef GPU_CODEGEN
llvm::Pass *createPPCGCodeGenerationPass();
+#endif
llvm::Pass *createIslScheduleOptimizerPass();
extern char &CodePreparationID;
@@ -72,7 +74,9 @@ struct PollyForcePassLinking {
polly::createPollyCanonicalizePass();
polly::createIslAstInfoPass();
polly::createCodeGenerationPass();
+#ifdef GPU_CODEGEN
polly::createPPCGCodeGenerationPass();
+#endif
polly::createIslScheduleOptimizerPass();
}
} PollyForcePassLinking; // Force link by creating a global definition.
@@ -86,7 +90,9 @@ void initializeJSONExporterPass(llvm::Pa
void initializeJSONImporterPass(llvm::PassRegistry &);
void initializeIslAstInfoPass(llvm::PassRegistry &);
void initializeCodeGenerationPass(llvm::PassRegistry &);
+#ifdef GPU_CODEGEN
void initializePPCGCodeGenerationPass(llvm::PassRegistry &);
+#endif
void initializeIslScheduleOptimizerPass(llvm::PassRegistry &);
void initializePollyCanonicalizePass(llvm::PassRegistry &);
} // namespace llvm
Modified: polly/trunk/lib/Support/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/RegisterPasses.cpp?rev=275310&r1=275309&r2=275310&view=diff
==============================================================================
--- polly/trunk/lib/Support/RegisterPasses.cpp (original)
+++ polly/trunk/lib/Support/RegisterPasses.cpp Wed Jul 13 14:52:24 2016
@@ -90,7 +90,9 @@ enum TargetChoice { TARGET_CPU, TARGET_G
static cl::opt<TargetChoice>
Target("polly-target", cl::desc("The hardware to target"),
cl::values(clEnumValN(TARGET_CPU, "cpu", "generate CPU code"),
+#ifdef GPU_CODEGEN
clEnumValN(TARGET_GPU, "gpu", "generate GPU code"),
+#endif
clEnumValEnd),
cl::init(TARGET_CPU), cl::ZeroOrMore, cl::cat(PollyCategory));
@@ -153,7 +155,10 @@ static cl::opt<bool>
namespace polly {
void initializePollyPasses(PassRegistry &Registry) {
initializeCodeGenerationPass(Registry);
+
+#ifdef GPU_CODEGEN
initializePPCGCodeGenerationPass(Registry);
+#endif
initializeCodePreparationPass(Registry);
initializeDeadCodeElimPass(Registry);
initializeDependenceInfoPass(Registry);
@@ -235,7 +240,9 @@ void registerPollyPasses(llvm::legacy::P
PM.add(polly::createJSONExporterPass());
if (Target == TARGET_GPU) {
+#ifdef GPU_CODEGEN
PM.add(polly::createPPCGCodeGenerationPass());
+#endif
} else {
switch (CodeGenerator) {
case CODEGEN_ISL:
More information about the llvm-commits
mailing list