[llvm-commits] [polly] r150674 - /polly/trunk/lib/RegisterPasses.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Thu Feb 16 01:56:17 PST 2012
Author: grosser
Date: Thu Feb 16 03:56:17 2012
New Revision: 150674
URL: http://llvm.org/viewvc/llvm-project?rev=150674&view=rev
Log:
RegisterPasses: Allow to print the CFG right after polly
Modified:
polly/trunk/lib/RegisterPasses.cpp
Modified: polly/trunk/lib/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/RegisterPasses.cpp?rev=150674&r1=150673&r2=150674&view=diff
==============================================================================
--- polly/trunk/lib/RegisterPasses.cpp (original)
+++ polly/trunk/lib/RegisterPasses.cpp Thu Feb 16 03:56:17 2012
@@ -20,6 +20,7 @@
#include "polly/TempScopInfo.h"
#include "llvm/Analysis/Passes.h"
+#include "llvm/Analysis/CFGPrinter.h"
#include "llvm/InitializePasses.h"
#include "llvm/PassManager.h"
#include "llvm/PassRegistry.h"
@@ -89,6 +90,12 @@
cl::value_desc("Run the Polly DOT printer at -O3 (no BB content"),
cl::init(false));
+static cl::opt<bool>
+CFGPrinter("polly-view-cfg",
+ cl::desc("Show the Polly CFG right after code generation"),
+ cl::Hidden,
+ cl::init(false));
+
void initializePollyPasses(PassRegistry &Registry) {
initializeCloogInfoPass(Registry);
initializeCodeGenerationPass(Registry);
@@ -204,6 +211,9 @@
if (RunCodegen)
PM.add(polly::createCodeGenerationPass());
+
+ if (CFGPrinter)
+ PM.add(llvm::createCFGPrinterPass());
}
static
More information about the llvm-commits
mailing list