Deleted Added
full compact
DomPrinter.cpp (202878) DomPrinter.cpp (207618)
1//===- DomPrinter.cpp - DOT printer for the dominance trees ------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 69 unchanged lines hidden (view full) ---

78
79 std::string getNodeLabel(DomTreeNode *Node, PostDominatorTree *G ) {
80 return DOTGraphTraits<DomTreeNode*>::getNodeLabel(Node, G->getRootNode());
81 }
82};
83}
84
85namespace {
1//===- DomPrinter.cpp - DOT printer for the dominance trees ------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 69 unchanged lines hidden (view full) ---

78
79 std::string getNodeLabel(DomTreeNode *Node, PostDominatorTree *G ) {
80 return DOTGraphTraits<DomTreeNode*>::getNodeLabel(Node, G->getRootNode());
81 }
82};
83}
84
85namespace {
86template <class Analysis, bool OnlyBBS>
87struct GenericGraphViewer : public FunctionPass {
88 std::string Name;
89
90 GenericGraphViewer(std::string GraphName, const void *ID) : FunctionPass(ID) {
91 Name = GraphName;
92 }
93
94 virtual bool runOnFunction(Function &F) {
95 Analysis *Graph;
96 std::string Title, GraphName;
97 Graph = &getAnalysis<Analysis>();
98 GraphName = DOTGraphTraits<Analysis*>::getGraphName(Graph);
99 Title = GraphName + " for '" + F.getNameStr() + "' function";
100 ViewGraph(Graph, Name, OnlyBBS, Title);
101
102 return false;
103 }
104
105 virtual void getAnalysisUsage(AnalysisUsage &AU) const {
106 AU.setPreservesAll();
107 AU.addRequired<Analysis>();
108 }
109};
110
111struct DomViewer
112 : public DOTGraphTraitsViewer<DominatorTree, false> {
113 static char ID;
114 DomViewer() : DOTGraphTraitsViewer<DominatorTree, false>("dom", &ID){}
115};
116
117struct DomOnlyViewer
118 : public DOTGraphTraitsViewer<DominatorTree, true> {

--- 124 unchanged lines hidden ---
86struct DomViewer
87 : public DOTGraphTraitsViewer<DominatorTree, false> {
88 static char ID;
89 DomViewer() : DOTGraphTraitsViewer<DominatorTree, false>("dom", &ID){}
90};
91
92struct DomOnlyViewer
93 : public DOTGraphTraitsViewer<DominatorTree, true> {

--- 124 unchanged lines hidden ---