DomPrinter.cpp (210299) | DomPrinter.cpp (212904) |
---|---|
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//===----------------------------------------------------------------------===// --- 72 unchanged lines hidden (view full) --- 81 } 82}; 83} 84 85namespace { 86struct DomViewer 87 : public DOTGraphTraitsViewer<DominatorTree, false> { 88 static char ID; | 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//===----------------------------------------------------------------------===// --- 72 unchanged lines hidden (view full) --- 81 } 82}; 83} 84 85namespace { 86struct DomViewer 87 : public DOTGraphTraitsViewer<DominatorTree, false> { 88 static char ID; |
89 DomViewer() : DOTGraphTraitsViewer<DominatorTree, false>("dom", &ID){} | 89 DomViewer() : DOTGraphTraitsViewer |
90}; 91 92struct DomOnlyViewer 93 : public DOTGraphTraitsViewer<DominatorTree, true> { 94 static char ID; | 90}; 91 92struct DomOnlyViewer 93 : public DOTGraphTraitsViewer<DominatorTree, true> { 94 static char ID; |
95 DomOnlyViewer() : DOTGraphTraitsViewer<DominatorTree, true>("domonly", &ID){} | 95 DomOnlyViewer() : DOTGraphTraitsViewer |
96}; 97 98struct PostDomViewer 99 : public DOTGraphTraitsViewer<PostDominatorTree, false> { 100 static char ID; 101 PostDomViewer() : | 96}; 97 98struct PostDomViewer 99 : public DOTGraphTraitsViewer<PostDominatorTree, false> { 100 static char ID; 101 PostDomViewer() : |
102 DOTGraphTraitsViewer<PostDominatorTree, false>("postdom", &ID){} | 102 DOTGraphTraitsViewer |
103}; 104 105struct PostDomOnlyViewer 106 : public DOTGraphTraitsViewer<PostDominatorTree, true> { 107 static char ID; 108 PostDomOnlyViewer() : | 103}; 104 105struct PostDomOnlyViewer 106 : public DOTGraphTraitsViewer<PostDominatorTree, true> { 107 static char ID; 108 PostDomOnlyViewer() : |
109 DOTGraphTraitsViewer<PostDominatorTree, true>("postdomonly", &ID){} | 109 DOTGraphTraitsViewer |
110}; 111} // end anonymous namespace 112 113char DomViewer::ID = 0; | 110}; 111} // end anonymous namespace 112 113char DomViewer::ID = 0; |
114RegisterPass<DomViewer> A("view-dom", 115 "View dominance tree of function"); | 114INITIALIZE_PASS(DomViewer, "view-dom", 115 "View dominance tree of function", false, false); |
116 117char DomOnlyViewer::ID = 0; | 116 117char DomOnlyViewer::ID = 0; |
118RegisterPass<DomOnlyViewer> B("view-dom-only", 119 "View dominance tree of function " 120 "(with no function bodies)"); | 118INITIALIZE_PASS(DomOnlyViewer, "view-dom-only", 119 "View dominance tree of function (with no function bodies)", 120 false, false); |
121 122char PostDomViewer::ID = 0; | 121 122char PostDomViewer::ID = 0; |
123RegisterPass<PostDomViewer> C("view-postdom", 124 "View postdominance tree of function"); | 123INITIALIZE_PASS(PostDomViewer, "view-postdom", 124 "View postdominance tree of function", false, false); |
125 126char PostDomOnlyViewer::ID = 0; | 125 126char PostDomOnlyViewer::ID = 0; |
127RegisterPass<PostDomOnlyViewer> D("view-postdom-only", 128 "View postdominance tree of function " 129 "(with no function bodies)"); | 127INITIALIZE_PASS(PostDomOnlyViewer, "view-postdom-only", 128 "View postdominance tree of function " 129 "(with no function bodies)", 130 false, false); |
130 131namespace { 132struct DomPrinter 133 : public DOTGraphTraitsPrinter<DominatorTree, false> { 134 static char ID; | 131 132namespace { 133struct DomPrinter 134 : public DOTGraphTraitsPrinter<DominatorTree, false> { 135 static char ID; |
135 DomPrinter() : DOTGraphTraitsPrinter<DominatorTree, false>("dom", &ID) {} | 136 DomPrinter() : DOTGraphTraitsPrinter |
136}; 137 138struct DomOnlyPrinter 139 : public DOTGraphTraitsPrinter<DominatorTree, true> { 140 static char ID; | 137}; 138 139struct DomOnlyPrinter 140 : public DOTGraphTraitsPrinter<DominatorTree, true> { 141 static char ID; |
141 DomOnlyPrinter() : DOTGraphTraitsPrinter<DominatorTree, true>("domonly", &ID) {} | 142 DomOnlyPrinter() : DOTGraphTraitsPrinter |
142}; 143 144struct PostDomPrinter 145 : public DOTGraphTraitsPrinter<PostDominatorTree, false> { 146 static char ID; 147 PostDomPrinter() : | 143}; 144 145struct PostDomPrinter 146 : public DOTGraphTraitsPrinter<PostDominatorTree, false> { 147 static char ID; 148 PostDomPrinter() : |
148 DOTGraphTraitsPrinter<PostDominatorTree, false>("postdom", &ID) {} | 149 DOTGraphTraitsPrinter |
149}; 150 151struct PostDomOnlyPrinter 152 : public DOTGraphTraitsPrinter<PostDominatorTree, true> { 153 static char ID; 154 PostDomOnlyPrinter() : | 150}; 151 152struct PostDomOnlyPrinter 153 : public DOTGraphTraitsPrinter<PostDominatorTree, true> { 154 static char ID; 155 PostDomOnlyPrinter() : |
155 DOTGraphTraitsPrinter<PostDominatorTree, true>("postdomonly", &ID) {} | 156 DOTGraphTraitsPrinter |
156}; 157} // end anonymous namespace 158 159 160 161char DomPrinter::ID = 0; | 157}; 158} // end anonymous namespace 159 160 161 162char DomPrinter::ID = 0; |
162RegisterPass<DomPrinter> E("dot-dom", 163 "Print dominance tree of function " 164 "to 'dot' file"); | 163INITIALIZE_PASS(DomPrinter, "dot-dom", 164 "Print dominance tree of function to 'dot' file", 165 false, false); |
165 166char DomOnlyPrinter::ID = 0; | 166 167char DomOnlyPrinter::ID = 0; |
167RegisterPass<DomOnlyPrinter> F("dot-dom-only", 168 "Print dominance tree of function " 169 "to 'dot' file " 170 "(with no function bodies)"); | 168INITIALIZE_PASS(DomOnlyPrinter, "dot-dom-only", 169 "Print dominance tree of function to 'dot' file " 170 "(with no function bodies)", 171 false, false); |
171 172char PostDomPrinter::ID = 0; | 172 173char PostDomPrinter::ID = 0; |
173RegisterPass<PostDomPrinter> G("dot-postdom", 174 "Print postdominance tree of function " 175 "to 'dot' file"); | 174INITIALIZE_PASS(PostDomPrinter, "dot-postdom", 175 "Print postdominance tree of function to 'dot' file", 176 false, false); |
176 177char PostDomOnlyPrinter::ID = 0; | 177 178char PostDomOnlyPrinter::ID = 0; |
178RegisterPass<PostDomOnlyPrinter> H("dot-postdom-only", 179 "Print postdominance tree of function " 180 "to 'dot' file " 181 "(with no function bodies)"); | 179INITIALIZE_PASS(PostDomOnlyPrinter, "dot-postdom-only", 180 "Print postdominance tree of function to 'dot' file " 181 "(with no function bodies)", 182 false, false); |
182 183// Create methods available outside of this file, to use them 184// "include/llvm/LinkAllPasses.h". Otherwise the pass would be deleted by 185// the link time optimization. 186 187FunctionPass *llvm::createDomPrinterPass() { 188 return new DomPrinter(); 189} --- 28 unchanged lines hidden --- | 183 184// Create methods available outside of this file, to use them 185// "include/llvm/LinkAllPasses.h". Otherwise the pass would be deleted by 186// the link time optimization. 187 188FunctionPass *llvm::createDomPrinterPass() { 189 return new DomPrinter(); 190} --- 28 unchanged lines hidden --- |