summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-01-13 02:51:47 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-01-13 02:51:47 +0000
commit7ad6d620b7da7812d6fd948660f1c33d3456edda (patch)
tree01ad235ce60e0f4df8ad39e6c5708b3e98706e8a /llvm/tools/opt
parent36d0b2b49f7c8991f5c3ccef098d1048b36918cc (diff)
downloadbcm5719-llvm-7ad6d620b7da7812d6fd948660f1c33d3456edda.tar.gz
bcm5719-llvm-7ad6d620b7da7812d6fd948660f1c33d3456edda.zip
[PM] Fold all three analysis managers into a single AnalysisManager
template. This consolidates three copies of nearly the same core logic. It adds "complexity" to the ModuleAnalysisManager in that it makes it possible to share a ModuleAnalysisManager across multiple modules... But it does so by deleting *all of the code*, so I'm OK with that. This will naturally make fixing bugs in this code much simpler, etc. The only down side here is that we have to use 'typename' and 'this->' in various places, and the implementation is lifted into the header. I'll take that for the code size reduction. The convenient names are still typedef-ed and used throughout so that users can largely ignore this aspect of the implementation. The follow-up change to this will do the exact same refactoring for the PassManagers. =D It turns out that the interesting different code is almost entirely in the adaptors. At the end, that should be essentially all that is left. llvm-svn: 225757
Diffstat (limited to 'llvm/tools/opt')
-rw-r--r--llvm/tools/opt/Passes.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/tools/opt/Passes.h b/llvm/tools/opt/Passes.h
index 54050854c65..f8273be1e9d 100644
--- a/llvm/tools/opt/Passes.h
+++ b/llvm/tools/opt/Passes.h
@@ -17,12 +17,10 @@
#define LLVM_TOOLS_OPT_PASSES_H
#include "llvm/ADT/StringRef.h"
+#include "llvm/IR/PassManager.h"
+#include "llvm/Analysis/CGSCCPassManager.h"
namespace llvm {
-class CGSCCAnalysisManager;
-class FunctionAnalysisManager;
-class ModuleAnalysisManager;
-class ModulePassManager;
/// \brief Registers all available module analysis passes.
///
OpenPOWER on IntegriCloud