path: root/tools/opt/GraphPrinters.cpp
diff options
authorChandler Carruth <>2014-01-13 13:07:17 +0000
committerChandler Carruth <>2014-01-13 13:07:17 +0000
commit7f2eff792a2e18758a25956abdac2440ee18dd7f (patch)
tree09911f13e262320405959f2fd63dc7c2294275fc /tools/opt/GraphPrinters.cpp
parentbb4954ddbfc9c1c3b2aa45b551bc02927ab65629 (diff)
[PM] Split DominatorTree into a concrete analysis result object which
can be used by both the new pass manager and the old. This removes it from any of the virtual mess of the pass interfaces and lets it derive cleanly from the DominatorTreeBase<> template. In turn, tons of boilerplate interface can be nuked and it turns into a very straightforward extension of the base DominatorTree interface. The old analysis pass is now a simple wrapper. The names and style of this split should match the split between CallGraph and CallGraphWrapperPass. All of the users of DominatorTree have been updated to match using many of the same tricks as with CallGraph. The goal is that the common type remains the resulting DominatorTree rather than the pass. This will make subsequent work toward the new pass manager significantly easier. Also in numerous places things became cleaner because I switched from re-running the pass (!!! mid way through some other passes run!!!) to directly recomputing the domtree. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/GraphPrinters.cpp')
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/opt/GraphPrinters.cpp b/tools/opt/GraphPrinters.cpp
index 9ec55134f5..b299f4c362 100644
--- a/tools/opt/GraphPrinters.cpp
+++ b/tools/opt/GraphPrinters.cpp
@@ -31,12 +31,11 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
- AU.addRequired<DominatorTree>();
+ AU.addRequired<DominatorTreeWrapperPass>();
virtual bool runOnFunction(Function &F) {
- getAnalysis<DominatorTree>().dump();
+ getAnalysis<DominatorTreeWrapperPass>().dump();
return false;