From f50dbc44bae68329e24a262b0bacf761a4dff186 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sun, 23 Oct 2011 20:59:11 +0000 Subject: [PATCH] RegisterPasses: Allow to disable code generation. llvm-svn: 142765 --- polly/lib/RegisterPasses.cpp | 8 +++++++- polly/www/example_load_Polly_into_clang.html | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/polly/lib/RegisterPasses.cpp b/polly/lib/RegisterPasses.cpp index 4fc027d7d111..ef91b365a8e4 100644 --- a/polly/lib/RegisterPasses.cpp +++ b/polly/lib/RegisterPasses.cpp @@ -28,6 +28,10 @@ using namespace llvm; +static cl::opt +DisableCodegen("polly-no-codegen", + cl::desc("Disable Polly Code Generation"), cl::Hidden, + cl::init(false)); static cl::opt PollyViewer("enable-polly-viewer", cl::desc("Enable the Polly DOT viewer in -O3"), cl::Hidden, @@ -117,7 +121,9 @@ static void registerPollyPasses(const llvm::PassManagerBuilder &Builder, PM.add(polly::createDOTOnlyPrinterPass()); PM.add(polly::createIslScheduleOptimizerPass()); - PM.add(polly::createCodeGenerationPass()); + + if (!DisableCodegen) + PM.add(polly::createCodeGenerationPass()); } // Execute Polly together with a set of preparing passes. diff --git a/polly/www/example_load_Polly_into_clang.html b/polly/www/example_load_Polly_into_clang.html index 877d96e341be..56479d75d0d7 100644 --- a/polly/www/example_load_Polly_into_clang.html +++ b/polly/www/example_load_Polly_into_clang.html @@ -47,6 +47,12 @@ command line. To limit the execution of Polly to a single function, use the option '-polly-detect-only=functionname'. +

Disable LLVM-IR generation

+Polly normally regenerates LLVM-IR from the Polyhedral representation. To only +see the effects of the preparing transformation, but to disable Polly code +generation add the option 'polly-no-codegen'. + +