From d01918fa13f09b35571df55a378a37d9bb05a460 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 13 Feb 2015 09:51:50 +0000 Subject: [PATCH] [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. llvm-svn: 229091 --- polly/include/polly/Canonicalization.h | 4 ++-- polly/include/polly/RegisterPasses.h | 4 ++-- polly/lib/CodeGen/PTXGenerator.cpp | 2 +- polly/lib/Support/RegisterPasses.cpp | 6 +++--- polly/lib/Transform/Canonicalization.cpp | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/polly/include/polly/Canonicalization.h b/polly/include/polly/Canonicalization.h index c69bf1376ce8..723b49073bab 100644 --- a/polly/include/polly/Canonicalization.h +++ b/polly/include/polly/Canonicalization.h @@ -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 diff --git a/polly/include/polly/RegisterPasses.h b/polly/include/polly/RegisterPasses.h index 91e1e9cc74a1..38aca82bff4f 100644 --- a/polly/include/polly/RegisterPasses.h +++ b/polly/include/polly/RegisterPasses.h @@ -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 diff --git a/polly/lib/CodeGen/PTXGenerator.cpp b/polly/lib/CodeGen/PTXGenerator.cpp index 06a83d7798bb..987aee004b3f 100644 --- a/polly/lib/CodeGen/PTXGenerator.cpp +++ b/polly/lib/CodeGen/PTXGenerator.cpp @@ -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" diff --git a/polly/lib/Support/RegisterPasses.cpp b/polly/lib/Support/RegisterPasses.cpp index 47b6b61b88e9..11b41fb8a400 100644 --- a/polly/lib/Support/RegisterPasses.cpp +++ b/polly/lib/Support/RegisterPasses.cpp @@ -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; diff --git a/polly/lib/Transform/Canonicalization.cpp b/polly/lib/Transform/Canonicalization.cpp index 40903c6b9365..8b49571fa240 100644 --- a/polly/lib/Transform/Canonicalization.cpp +++ b/polly/lib/Transform/Canonicalization.cpp @@ -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);