diff options
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/bugpoint/CrashDebugger.cpp | 4 | ||||
-rw-r--r-- | llvm/tools/bugpoint/ExtractFunction.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/bugpoint/OptimizerDriver.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/bugpoint/bugpoint.cpp | 4 | ||||
-rw-r--r-- | llvm/tools/gold/gold-plugin.cpp | 8 | ||||
-rw-r--r-- | llvm/tools/llc/llc.cpp | 4 | ||||
-rw-r--r-- | llvm/tools/llvm-extract/llvm-extract.cpp | 4 | ||||
-rw-r--r-- | llvm/tools/llvm-stress/llvm-stress.cpp | 4 | ||||
-rw-r--r-- | llvm/tools/opt/opt.cpp | 15 |
9 files changed, 24 insertions, 23 deletions
diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp index bac948aaf3a..ee18169923e 100644 --- a/llvm/tools/bugpoint/CrashDebugger.cpp +++ b/llvm/tools/bugpoint/CrashDebugger.cpp @@ -19,11 +19,11 @@ #include "llvm/IR/Constants.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Instructions.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Module.h" #include "llvm/IR/ValueSymbolTable.h" #include "llvm/IR/Verifier.h" #include "llvm/Pass.h" -#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/FileUtilities.h" #include "llvm/Transforms/Scalar.h" @@ -407,7 +407,7 @@ bool ReduceCrashingInstructions::TestInsts(std::vector<const Instruction*> } // Verify that this is still valid. - PassManager Passes; + legacy::PassManager Passes; Passes.add(createVerifierPass()); Passes.add(createDebugInfoVerifierPass()); Passes.run(*M); diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp index 34fe53c0811..0d001cdc811 100644 --- a/llvm/tools/bugpoint/ExtractFunction.cpp +++ b/llvm/tools/bugpoint/ExtractFunction.cpp @@ -17,10 +17,10 @@ #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Module.h" #include "llvm/IR/Verifier.h" #include "llvm/Pass.h" -#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FileUtilities.h" diff --git a/llvm/tools/bugpoint/OptimizerDriver.cpp b/llvm/tools/bugpoint/OptimizerDriver.cpp index f197cc53926..481f343c988 100644 --- a/llvm/tools/bugpoint/OptimizerDriver.cpp +++ b/llvm/tools/bugpoint/OptimizerDriver.cpp @@ -18,9 +18,9 @@ #include "BugDriver.h" #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/IR/DataLayout.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Module.h" #include "llvm/IR/Verifier.h" -#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FileUtilities.h" diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp index d0bade507d2..0ee3784660a 100644 --- a/llvm/tools/bugpoint/bugpoint.cpp +++ b/llvm/tools/bugpoint/bugpoint.cpp @@ -16,10 +16,10 @@ #include "BugDriver.h" #include "ToolRunner.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/LegacyPassNameParser.h" #include "llvm/LinkAllIR.h" #include "llvm/LinkAllPasses.h" -#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/PluginLoader.h" @@ -92,7 +92,7 @@ static void BugpointInterruptFunction() { // Hack to capture a pass list. namespace { - class AddToDriver : public FunctionPassManager { + class AddToDriver : public legacy::FunctionPassManager { BugDriver &D; public: AddToDriver(BugDriver &_D) : FunctionPassManager(nullptr), D(_D) {} diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index b1a28c52290..9d09e0f301f 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -24,12 +24,12 @@ #include "llvm/IR/DiagnosticInfo.h" #include "llvm/IR/DiagnosticPrinter.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Module.h" #include "llvm/IR/Verifier.h" #include "llvm/Linker/Linker.h" #include "llvm/MC/SubtargetFeature.h" #include "llvm/Object/IRObjectFile.h" -#include "llvm/PassManager.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Support/Host.h" #include "llvm/Support/ManagedStatic.h" @@ -693,11 +693,11 @@ getModuleForFile(LLVMContext &Context, claimed_file &F, } static void runLTOPasses(Module &M, TargetMachine &TM) { - PassManager passes; + legacy::PassManager passes; passes.add(new DataLayoutPass()); passes.add(createTargetTransformInfoWrapperPass(TM.getTargetIRAnalysis())); - PassManagerBuilder PMB; + legacy::PassManagerBuilder PMB; PMB.LibraryInfo = new TargetLibraryInfoImpl(Triple(TM.getTargetTriple())); PMB.Inliner = createFunctionInliningPass(); PMB.VerifyInput = true; @@ -743,7 +743,7 @@ static void codegen(Module &M) { if (options::TheOutputType == options::OT_SAVE_TEMPS) saveBCFile(output_name + ".opt.bc", M); - PassManager CodeGenPasses; + legacy::PassManager CodeGenPasses; CodeGenPasses.add(new DataLayoutPass()); SmallString<128> Filename; diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 5565fb3b3ac..efa14222430 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -22,11 +22,11 @@ #include "llvm/IR/DataLayout.h" #include "llvm/IR/IRPrintingPasses.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Module.h" #include "llvm/IRReader/IRReader.h" #include "llvm/MC/SubtargetFeature.h" #include "llvm/Pass.h" -#include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FileSystem.h" @@ -293,7 +293,7 @@ static int compileModule(char **argv, LLVMContext &Context) { if (!Out) return 1; // Build up all of the passes that we want to do to the module. - PassManager PM; + legacy::PassManager PM; // Add an appropriate TargetLibraryInfo pass for the module's triple. TargetLibraryInfoImpl TLII(Triple(M->getTargetTriple())); diff --git a/llvm/tools/llvm-extract/llvm-extract.cpp b/llvm/tools/llvm-extract/llvm-extract.cpp index 53b2f0d00f4..8cbcdc50bce 100644 --- a/llvm/tools/llvm-extract/llvm-extract.cpp +++ b/llvm/tools/llvm-extract/llvm-extract.cpp @@ -20,7 +20,7 @@ #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/IRReader/IRReader.h" -#include "llvm/PassManager.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/ManagedStatic.h" @@ -246,7 +246,7 @@ int main(int argc, char **argv) { // In addition to deleting all other functions, we also want to spiff it // up a little bit. Do this now. - PassManager Passes; + legacy::PassManager Passes; Passes.add(new DataLayoutPass()); // Use correct DataLayout std::vector<GlobalValue*> Gvs(GVs.begin(), GVs.end()); diff --git a/llvm/tools/llvm-stress/llvm-stress.cpp b/llvm/tools/llvm-stress/llvm-stress.cpp index 21a79e3294a..05ceeb592a5 100644 --- a/llvm/tools/llvm-stress/llvm-stress.cpp +++ b/llvm/tools/llvm-stress/llvm-stress.cpp @@ -20,7 +20,7 @@ #include "llvm/IR/LegacyPassNameParser.h" #include "llvm/IR/Module.h" #include "llvm/IR/Verifier.h" -#include "llvm/PassManager.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/ManagedStatic.h" @@ -711,7 +711,7 @@ int main(int argc, char **argv) { return 1; } - PassManager Passes; + legacy::PassManager Passes; Passes.add(createVerifierPass()); Passes.add(createDebugInfoVerifierPass()); Passes.add(createPrintModulePass(Out->os())); diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 00337ded99a..59b63093b36 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -35,7 +35,7 @@ #include "llvm/LinkAllIR.h" #include "llvm/LinkAllPasses.h" #include "llvm/MC/SubtargetFeature.h" -#include "llvm/PassManager.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/ManagedStatic.h" @@ -180,7 +180,7 @@ DefaultDataLayout("default-data-layout", -static inline void addPass(PassManagerBase &PM, Pass *P) { +static inline void addPass(legacy::PassManagerBase &PM, Pass *P) { // Add the pass to the pass manager... PM.add(P); @@ -195,7 +195,8 @@ static inline void addPass(PassManagerBase &PM, Pass *P) { /// OptLevel. /// /// OptLevel - Optimization Level -static void AddOptimizationPasses(PassManagerBase &MPM,FunctionPassManager &FPM, +static void AddOptimizationPasses(legacy::PassManagerBase &MPM, + legacy::FunctionPassManager &FPM, unsigned OptLevel, unsigned SizeLevel) { FPM.add(createVerifierPass()); // Verify that input is correct MPM.add(createDebugInfoVerifierPass()); // Verify that debug info is correct @@ -230,7 +231,7 @@ static void AddOptimizationPasses(PassManagerBase &MPM,FunctionPassManager &FPM, Builder.populateModulePassManager(MPM); } -static void AddStandardLinkPasses(PassManagerBase &PM) { +static void AddStandardLinkPasses(legacy::PassManagerBase &PM) { PassManagerBuilder Builder; Builder.VerifyInput = true; Builder.StripDebug = StripDebug; @@ -406,7 +407,7 @@ int main(int argc, char **argv) { // Create a PassManager to hold and optimize the collection of passes we are // about to build. // - PassManager Passes; + legacy::PassManager Passes; // Add an appropriate TargetLibraryInfo pass for the module's triple. TargetLibraryInfoImpl TLII(ModuleTriple); @@ -430,9 +431,9 @@ int main(int argc, char **argv) { Passes.add(createTargetTransformInfoWrapperPass(TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())); - std::unique_ptr<FunctionPassManager> FPasses; + std::unique_ptr<legacy::FunctionPassManager> FPasses; if (OptLevelO1 || OptLevelO2 || OptLevelOs || OptLevelOz || OptLevelO3) { - FPasses.reset(new FunctionPassManager(M.get())); + FPasses.reset(new legacy::FunctionPassManager(M.get())); if (DL) FPasses->add(new DataLayoutPass()); FPasses->add(createTargetTransformInfoWrapperPass( |