39 return "Post dominance root node";
58 return "Dominator tree";
74 return "Post dominator tree";
87 errs() <<
"DomTree dump not available, build with DEBUG\n";
93 this->
viewGraph(
"domtree",
"Dominator Tree for function");
95 errs() <<
"DomTree dump not available, build with DEBUG\n";
100 struct DominatorTreeWrapperPassAnalysisGraphTraits {
107 DominatorTreeWrapperPass, false, DominatorTree *,
108 DominatorTreeWrapperPassAnalysisGraphTraits> {
112 DominatorTreeWrapperPassAnalysisGraphTraits>(
119 DominatorTreeWrapperPass, true, DominatorTree *,
120 DominatorTreeWrapperPassAnalysisGraphTraits> {
124 DominatorTreeWrapperPassAnalysisGraphTraits>(
130 struct PostDominatorTreeWrapperPassAnalysisGraphTraits {
137 PostDominatorTreeWrapperPass, false,
139 PostDominatorTreeWrapperPassAnalysisGraphTraits> {
144 PostDominatorTreeWrapperPassAnalysisGraphTraits>(
151 PostDominatorTreeWrapperPass, true,
153 PostDominatorTreeWrapperPassAnalysisGraphTraits> {
155 PostDomOnlyViewer() :
158 PostDominatorTreeWrapperPassAnalysisGraphTraits>(
167 "View dominance tree of function",
false,
false)
169 char DomOnlyViewer::
ID = 0;
174 char PostDomViewer::ID = 0;
176 "View postdominance tree of
function", false, false)
178 char PostDomOnlyViewer::ID = 0;
180 "View postdominance tree of function "
181 "(with no function bodies)",
186 DominatorTreeWrapperPass, false, DominatorTree *,
187 DominatorTreeWrapperPassAnalysisGraphTraits> {
191 DominatorTreeWrapperPassAnalysisGraphTraits>(
198 DominatorTreeWrapperPass, true, DominatorTree *,
199 DominatorTreeWrapperPassAnalysisGraphTraits> {
203 DominatorTreeWrapperPassAnalysisGraphTraits>(
209 struct PostDomPrinter
211 PostDominatorTreeWrapperPass, false,
213 PostDominatorTreeWrapperPassAnalysisGraphTraits> {
218 PostDominatorTreeWrapperPassAnalysisGraphTraits>(
224 struct PostDomOnlyPrinter
226 PostDominatorTreeWrapperPass, true,
228 PostDominatorTreeWrapperPassAnalysisGraphTraits> {
230 PostDomOnlyPrinter() :
233 PostDominatorTreeWrapperPassAnalysisGraphTraits>(
244 "Print dominance tree of function to 'dot' file",
247 char DomOnlyPrinter::
ID = 0;
253 char PostDomPrinter::ID = 0;
258 char PostDomOnlyPrinter::ID = 0;
269 return new DomPrinter();
273 return new DomOnlyPrinter();
277 return new DomViewer();
281 return new DomOnlyViewer();
285 return new PostDomPrinter();
289 return new PostDomOnlyPrinter();
293 return new PostDomViewer();
297 return new PostDomOnlyViewer();
FunctionPass * createDomOnlyViewerPass()
void initializeDomViewerPass(PassRegistry &)
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
void Print(const Unit &v, const char *PrintAfter)
FunctionPass * createPostDomPrinterPass()
void initializePostDomViewerPass(PassRegistry &)
void initializePostDomOnlyViewerPass(PassRegistry &)
const Function * getParent() const
Return the enclosing method, or null if none.
void initializeDomOnlyPrinterPass(PassRegistry &)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
FunctionPass * createDomViewerPass()
void initializePostDomPrinterPass(PassRegistry &)
DominatorTree & getDomTree()
DOTGraphTraits(bool isSimple=false)
std::string getNodeLabel(const void *, const GraphType &)
getNodeLabel - Given a node and a pointer to the top level graph, return the label to print in the no...
static bool isSimple(Instruction *I)
Base class for the actual dominator tree node.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
Function Alias Analysis false
FunctionPass * createDomPrinterPass()
LLVM Basic Block Representation.
void initializeDomOnlyViewerPass(PassRegistry &)
INITIALIZE_PASS(DomViewer,"view-dom","View dominance tree of function", false, false) char DomOnlyViewer INITIALIZE_PASS(DomOnlyViewer,"view-dom-only","View dominance tree of function (with no function bodies)", false, false) char PostDomViewer INITIALIZE_PASS(PostDomViewer,"view-postdom","View postdominance tree of function", false, false) char PostDomOnlyViewer INITIALIZE_PASS(PostDomOnlyViewer,"view-postdom-only","View postdominance tree of function ""(with no function bodies)", false, false) namespace
std::string getNodeLabel(DomTreeNode *Node, DominatorTree *G)
DOTGraphTraits(bool isSimple=false)
FunctionPass class - This class is used to implement most global optimizations.
static std::string getGraphName(PostDominatorTree *DT)
void ViewGraph(const GraphType &G, const Twine &Name, bool ShortNames=false, const Twine &Title="", GraphProgram::Name Program=GraphProgram::DOT)
ViewGraph - Emit a dot graph, run 'dot', run gv on the postscript file, then cleanup.
dot regions Print regions of function to dot file(with no function bodies)"
std::string getNodeLabel(DomTreeNode *Node, DomTreeNode *Graph)
DOTGraphTraits - Template class that can be specialized to customize how graphs are converted to 'dot...
void initializePostDomOnlyPrinterPass(PassRegistry &)
PostDominatorTree & getPostDomTree()
DOTGraphTraits(bool isSimple=false)
FunctionPass * createDomOnlyPrinterPass()
std::string getNodeLabel(DomTreeNode *Node, PostDominatorTree *G)
FunctionPass * createPostDomViewerPass()
void initializeDomPrinterPass(PassRegistry &)
PostDominatorTree Class - Concrete subclass of DominatorTree that is used to compute the post-dominat...
FunctionPass * createPostDomOnlyViewerPass()
FunctionPass * createPostDomOnlyPrinterPass()
static std::string getGraphName(DominatorTree *DT)
DomTreeNodeBase< NodeT > * getRootNode()
getRootNode - This returns the entry node for the CFG of the function.
DefaultDOTGraphTraits - This class provides the default implementations of all of the DOTGraphTraits ...
print Print MemDeps of function
Legacy analysis pass which computes a DominatorTree.