summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-01-13 13:07:17 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-01-13 13:07:17 +0000
commit73523021d0a97c150a76a5cf4a91e99cd03b9efb (patch)
treed2719d151f36e8afd70aee405bd992cd52a2022c /llvm/tools/opt
parentca9af6cad9e8c57c6e04ecffb19bb56493ab7608 (diff)
downloadbcm5719-llvm-73523021d0a97c150a76a5cf4a91e99cd03b9efb.tar.gz
bcm5719-llvm-73523021d0a97c150a76a5cf4a91e99cd03b9efb.zip
[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. llvm-svn: 199104
Diffstat (limited to 'llvm/tools/opt')
-rw-r--r--llvm/tools/opt/GraphPrinters.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/tools/opt/GraphPrinters.cpp b/llvm/tools/opt/GraphPrinters.cpp
index 9ec55134f59..b299f4c3624 100644
--- a/llvm/tools/opt/GraphPrinters.cpp
+++ b/llvm/tools/opt/GraphPrinters.cpp
@@ -31,12 +31,11 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
- AU.addRequired<DominatorTree>();
-
+ AU.addRequired<DominatorTreeWrapperPass>();
}
virtual bool runOnFunction(Function &F) {
- getAnalysis<DominatorTree>().dump();
+ getAnalysis<DominatorTreeWrapperPass>().dump();
return false;
}
};
OpenPOWER on IntegriCloud