[PM] Convert Polly over to directly use the legacy pass manager
authorChandler Carruth <chandlerc@gmail.com>
Fri, 13 Feb 2015 09:51:50 +0000 (09:51 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 13 Feb 2015 09:51:50 +0000 (09:51 +0000)
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.

llvm-svn: 229091

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

index c69bf13..723b490 100644 (file)
@@ -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
index 91e1e9c..38aca82 100644 (file)
@@ -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
index 06a83d7..987aee0 100644 (file)
@@ -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"
index 47b6b61..11b41fb 100644 (file)
@@ -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 &Registry) {
 /// 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;
 
index 40903c6..8b49571 100644 (file)
@@ -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(AnalysisUsage &AU) const {}
 void PollyCanonicalize::releaseMemory() {}
 
 bool PollyCanonicalize::runOnModule(Module &M) {
-  PassManager PM;
+  legacy::PassManager PM;
   registerCanonicalicationPasses(PM);
   PM.run(M);