[polly] r229091 - [PM] Convert Polly over to directly use the legacy pass manager

Chandler Carruth chandlerc at gmail.com
Fri Feb 13 01:51:50 PST 2015


Author: chandlerc
Date: Fri Feb 13 03:51:50 2015
New Revision: 229091

URL: http://llvm.org/viewvc/llvm-project?rev=229091&view=rev
Log:
[PM] Convert Polly over to directly use the legacy pass manager
namespace and header rather than the top-level header and using
declarations. These helpers impede modular builds and are going away.
Migrating away from them will also be necessary to start mixing in any
usage of the new pass manager.

Modified:
    polly/trunk/include/polly/Canonicalization.h
    polly/trunk/include/polly/RegisterPasses.h
    polly/trunk/lib/CodeGen/PTXGenerator.cpp
    polly/trunk/lib/Support/RegisterPasses.cpp
    polly/trunk/lib/Transform/Canonicalization.cpp

Modified: polly/trunk/include/polly/Canonicalization.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/Canonicalization.h?rev=229091&r1=229090&r2=229091&view=diff
==============================================================================
--- polly/trunk/include/polly/Canonicalization.h (original)
+++ polly/trunk/include/polly/Canonicalization.h Fri Feb 13 03:51:50 2015
@@ -10,7 +10,7 @@
 #ifndef POLLY_CANONICALIZATION_H
 #define POLLY_CANONICALIZATION_H
 
-#include "llvm/PassManager.h"
+#include "llvm/IR/LegacyPassManager.h"
 
 namespace polly {
 
@@ -21,7 +21,7 @@ namespace polly {
 /// into a canonical form that simplifies the analysis and optimization passes
 /// of Polly. The set of optimization passes scheduled here is probably not yet
 /// optimal. TODO: Optimize the set of canonicalization passes.
-void registerCanonicalicationPasses(llvm::PassManagerBase &PM);
+void registerCanonicalicationPasses(llvm::legacy::PassManagerBase &PM);
 }
 
 #endif

Modified: polly/trunk/include/polly/RegisterPasses.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/RegisterPasses.h?rev=229091&r1=229090&r2=229091&view=diff
==============================================================================
--- polly/trunk/include/polly/RegisterPasses.h (original)
+++ polly/trunk/include/polly/RegisterPasses.h Fri Feb 13 03:51:50 2015
@@ -14,7 +14,7 @@
 #ifndef POLLY_REGISTER_PASSES_H
 #define POLLY_REGISTER_PASSES_H
 
-#include "llvm/PassManager.h"
+#include "llvm/IR/LegacyPassManager.h"
 
 namespace llvm {
 namespace legacy {
@@ -24,6 +24,6 @@ class PassManagerBase;
 
 namespace polly {
 void initializePollyPasses(llvm::PassRegistry &Registry);
-void registerPollyPasses(llvm::PassManagerBase &PM);
+void registerPollyPasses(llvm::legacy::PassManagerBase &PM);
 }
 #endif

Modified: polly/trunk/lib/CodeGen/PTXGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/PTXGenerator.cpp?rev=229091&r1=229090&r2=229091&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/PTXGenerator.cpp (original)
+++ polly/trunk/lib/CodeGen/PTXGenerator.cpp Fri Feb 13 03:51:50 2015
@@ -17,7 +17,7 @@
 #include "polly/ScopDetection.h"
 #include "polly/ScopInfo.h"
 
-#include "llvm/PassManager.h"
+#include "llvm/IR/LegacyPassManager.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/Analysis/TargetLibraryInfo.h"
 #include "llvm/Support/Debug.h"

Modified: polly/trunk/lib/Support/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/RegisterPasses.cpp?rev=229091&r1=229090&r2=229091&view=diff
==============================================================================
--- polly/trunk/lib/Support/RegisterPasses.cpp (original)
+++ polly/trunk/lib/Support/RegisterPasses.cpp Fri Feb 13 03:51:50 2015
@@ -29,7 +29,7 @@
 #include "polly/ScopInfo.h"
 #include "polly/TempScopInfo.h"
 #include "llvm/Analysis/CFGPrinter.h"
-#include "llvm/PassManager.h"
+#include "llvm/IR/LegacyPassManager.h"
 #include "llvm/Transforms/IPO/PassManagerBuilder.h"
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Transforms/Vectorize.h"
@@ -182,7 +182,7 @@ void initializePollyPasses(PassRegistry
 /// scheduling optimizer.
 ///
 /// Polly supports the isl internal code generator.
-void registerPollyPasses(llvm::PassManagerBase &PM) {
+void registerPollyPasses(llvm::legacy::PassManagerBase &PM) {
   registerCanonicalicationPasses(PM);
 
   PM.add(polly::createScopInfoPass());
@@ -245,7 +245,7 @@ static bool shouldEnablePolly() {
 
 static void
 registerPollyEarlyAsPossiblePasses(const llvm::PassManagerBuilder &Builder,
-                                   llvm::PassManagerBase &PM) {
+                                   llvm::legacy::PassManagerBase &PM) {
   if (!polly::shouldEnablePolly())
     return;
 

Modified: polly/trunk/lib/Transform/Canonicalization.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/Canonicalization.cpp?rev=229091&r1=229090&r2=229091&view=diff
==============================================================================
--- polly/trunk/lib/Transform/Canonicalization.cpp (original)
+++ polly/trunk/lib/Transform/Canonicalization.cpp Fri Feb 13 03:51:50 2015
@@ -20,7 +20,7 @@
 using namespace llvm;
 using namespace polly;
 
-void polly::registerCanonicalicationPasses(llvm::PassManagerBase &PM) {
+void polly::registerCanonicalicationPasses(llvm::legacy::PassManagerBase &PM) {
   PM.add(llvm::createPromoteMemoryToRegisterPass());
   PM.add(llvm::createInstructionCombiningPass());
   PM.add(llvm::createCFGSimplificationPass());
@@ -61,7 +61,7 @@ void PollyCanonicalize::getAnalysisUsage
 void PollyCanonicalize::releaseMemory() {}
 
 bool PollyCanonicalize::runOnModule(Module &M) {
-  PassManager PM;
+  legacy::PassManager PM;
   registerCanonicalicationPasses(PM);
   PM.run(M);
 





More information about the llvm-commits mailing list