summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2016-02-25 07:23:08 +0000
committerJustin Bogner <mail@justinbogner.com>2016-02-25 07:23:08 +0000
commiteecc3c826a58cb96697e56e159b14c7e9ae605dc (patch)
tree18e4ebfe7faa7f2a97a07de81ae96dab75b7075c /llvm/tools/opt
parentbe8f522ef3df6aec5d4c9c2e897865e55bbdb6ff (diff)
downloadbcm5719-llvm-eecc3c826a58cb96697e56e159b14c7e9ae605dc.tar.gz
bcm5719-llvm-eecc3c826a58cb96697e56e159b14c7e9ae605dc.zip
PM: Implement a basic loop pass manager
This creates the new-style LoopPassManager and wires it up with dummy and print passes. This version doesn't support modifying the loop nest at all. It will be far easier to discuss and evaluate the approaches to that with this in place so that the boilerplate is out of the way. llvm-svn: 261831
Diffstat (limited to 'llvm/tools/opt')
-rw-r--r--llvm/tools/opt/NewPMDriver.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/opt/NewPMDriver.cpp b/llvm/tools/opt/NewPMDriver.cpp
index a95a4ed8a00..e0cc88bc33f 100644
--- a/llvm/tools/opt/NewPMDriver.cpp
+++ b/llvm/tools/opt/NewPMDriver.cpp
@@ -17,6 +17,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/CGSCCPassManager.h"
+#include "llvm/Analysis/LoopPassManager.h"
#include "llvm/Bitcode/BitcodeWriterPass.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRPrintingPasses.h"
@@ -62,6 +63,7 @@ bool llvm::runPassPipeline(StringRef Arg0, LLVMContext &Context, Module &M,
return false;
}
+ LoopAnalysisManager LAM(DebugPM);
FunctionAnalysisManager FAM(DebugPM);
CGSCCAnalysisManager CGAM(DebugPM);
ModuleAnalysisManager MAM(DebugPM);
@@ -73,6 +75,7 @@ bool llvm::runPassPipeline(StringRef Arg0, LLVMContext &Context, Module &M,
PB.registerModuleAnalyses(MAM);
PB.registerCGSCCAnalyses(CGAM);
PB.registerFunctionAnalyses(FAM);
+ PB.registerLoopAnalyses(LAM);
// Cross register the analysis managers through their proxies.
MAM.registerPass([&] { return FunctionAnalysisManagerModuleProxy(FAM); });
@@ -81,6 +84,8 @@ bool llvm::runPassPipeline(StringRef Arg0, LLVMContext &Context, Module &M,
CGAM.registerPass([&] { return ModuleAnalysisManagerCGSCCProxy(MAM); });
FAM.registerPass([&] { return CGSCCAnalysisManagerFunctionProxy(CGAM); });
FAM.registerPass([&] { return ModuleAnalysisManagerFunctionProxy(MAM); });
+ FAM.registerPass([&] { return LoopAnalysisManagerFunctionProxy(LAM); });
+ LAM.registerPass([&] { return FunctionAnalysisManagerLoopProxy(FAM); });
ModulePassManager MPM(DebugPM);
if (VK > VK_NoVerifier)
OpenPOWER on IntegriCloud