diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-11-09 12:26:54 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-11-09 12:26:54 +0000 |
commit | 49837ef8111fbeace7ae6379ca733c8f8fa94cfe (patch) | |
tree | 56766bbd9f25967c8c32bb5b735161305ea215ed /lib/IR | |
parent | 9defe9a7ccb29b02ed78bede5892fd4e3e64307b (diff) | |
download | external_llvm-49837ef8111fbeace7ae6379ca733c8f8fa94cfe.zip external_llvm-49837ef8111fbeace7ae6379ca733c8f8fa94cfe.tar.gz external_llvm-49837ef8111fbeace7ae6379ca733c8f8fa94cfe.tar.bz2 |
Move the old pass manager infrastructure into a legacy namespace and
give the files a legacy prefix in the right directory. Use forwarding
headers in the old locations to paper over the name change for most
clients during the transitional period.
No functionality changed here! This is just clearing some space to
reduce renaming churn later on with a new system.
Even when the new stuff starts to go in, it is going to be hidden behind
a flag and off-by-default as it is still WIP and under development.
This patch is specifically designed so that very little out-of-tree code
has to change. I'm going to work as hard as I can to keep that the case.
Only direct forward declarations of the PassManager class are impacted
by this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/CMakeLists.txt | 4 | ||||
-rw-r--r-- | lib/IR/LegacyPassManager.cpp (renamed from lib/IR/PassManager.cpp) | 30 |
2 files changed, 21 insertions, 13 deletions
diff --git a/lib/IR/CMakeLists.txt b/lib/IR/CMakeLists.txt index c2a4ee3..2ad5fdb 100644 --- a/lib/IR/CMakeLists.txt +++ b/lib/IR/CMakeLists.txt @@ -6,10 +6,10 @@ add_llvm_library(LLVMCore ConstantFold.cpp Constants.cpp Core.cpp + DIBuilder.cpp DataLayout.cpp DebugInfo.cpp DebugLoc.cpp - DIBuilder.cpp Dominators.cpp Function.cpp GCOV.cpp @@ -23,10 +23,10 @@ add_llvm_library(LLVMCore LLVMContext.cpp LLVMContextImpl.cpp LeakDetector.cpp + LegacyPassManager.cpp Metadata.cpp Module.cpp Pass.cpp - PassManager.cpp PassRegistry.cpp PrintModulePass.cpp Type.cpp diff --git a/lib/IR/PassManager.cpp b/lib/IR/LegacyPassManager.cpp index 8d2e2ca..a431d82 100644 --- a/lib/IR/PassManager.cpp +++ b/lib/IR/LegacyPassManager.cpp @@ -1,4 +1,4 @@ -//===- PassManager.cpp - LLVM Pass Infrastructure Implementation ----------===// +//===- LegacyPassManager.cpp - LLVM Pass Infrastructure Implementation ----===// // // The LLVM Compiler Infrastructure // @@ -7,16 +7,16 @@ // //===----------------------------------------------------------------------===// // -// This file implements the LLVM Pass Manager infrastructure. +// This file implements the legacy LLVM Pass Manager infrastructure. // //===----------------------------------------------------------------------===// -#include "llvm/PassManagers.h" #include "llvm/Assembly/PrintModulePass.h" #include "llvm/Assembly/Writer.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Module.h" -#include "llvm/PassManager.h" +#include "llvm/IR/LegacyPassManagers.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -28,11 +28,10 @@ #include <algorithm> #include <map> using namespace llvm; +using namespace llvm::legacy; // See PassManagers.h for Pass Manager infrastructure overview. -namespace llvm { - //===----------------------------------------------------------------------===// // Pass debugging information. Often it is useful to find out what pass is // running when a crash occurs in a utility. When this library is compiled with @@ -40,10 +39,12 @@ namespace llvm { // pass name to be printed before it executes. // +namespace { // Different debug levels that can be enabled... enum PassDebugLevel { Disabled, Arguments, Structure, Executions, Details }; +} static cl::opt<enum PassDebugLevel> PassDebugging("debug-pass", cl::Hidden, @@ -56,8 +57,10 @@ PassDebugging("debug-pass", cl::Hidden, clEnumVal(Details , "print pass details when it is executed"), clEnumValEnd)); +namespace { typedef llvm::cl::list<const llvm::PassInfo *, bool, PassNameParser> PassOptionList; +} // Print IR out before/after specified passes. static PassOptionList @@ -106,8 +109,6 @@ static bool ShouldPrintAfterPass(const PassInfo *PI) { return PrintAfterAll || ShouldPrintBeforeOrAfterPass(PI, PrintAfter); } -} // End of llvm namespace - /// isPassDebuggingExecutionsOrMore - Return true if -debug-pass=Executions /// or higher is specified. bool PMDataManager::isPassDebuggingExecutionsOrMore() const { @@ -149,7 +150,6 @@ void PassManagerPrettyStackEntry::print(raw_ostream &OS) const { namespace { - //===----------------------------------------------------------------------===// // BBPassManager // @@ -206,10 +206,10 @@ public: }; char BBPassManager::ID = 0; -} +} // End anonymous namespace namespace llvm { - +namespace legacy { //===----------------------------------------------------------------------===// // FunctionPassManagerImpl // @@ -277,7 +277,10 @@ public: void FunctionPassManagerImpl::anchor() {} char FunctionPassManagerImpl::ID = 0; +} // End of legacy namespace +} // End of llvm namespace +namespace { //===----------------------------------------------------------------------===// // MPPassManager // @@ -372,6 +375,10 @@ public: }; char MPPassManager::ID = 0; +} // End anonymous namespace + +namespace llvm { +namespace legacy { //===----------------------------------------------------------------------===// // PassManagerImpl // @@ -437,6 +444,7 @@ public: void PassManagerImpl::anchor() {} char PassManagerImpl::ID = 0; +} // End of legacy namespace } // End of llvm namespace namespace { |