forked from OSchip/llvm-project
[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
This commit is contained in:
parent
8f4f5090b4
commit
d01918fa13
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue