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)
171 "View dominance tree of function (with no function bodies)",
176 "View postdominance tree of function",
false,
false)
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",
249 "Print dominance tree of function to 'dot' file " 250 "(with no function bodies)",
255 "Print postdominance tree of function to 'dot' file",
260 "Print postdominance tree of function to 'dot' file " 261 "(with no function bodies)",
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...
FunctionPass * createPostDomPrinterPass()
This class represents lattice values for constants.
void initializePostDomViewerPass(PassRegistry &)
void initializePostDomOnlyViewerPass(PassRegistry &)
*ViewGraph Emit a dot run run gv on the postscript *then cleanup For use from the debugger *void ViewGraph(const GraphType &G, const Twine &Name, bool ShortNames=false, const Twine &Title="", GraphProgram::Name Program=GraphProgram::DOT)
void initializeDomOnlyPrinterPass(PassRegistry &)
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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)
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
FunctionPass * createDomPrinterPass()
LLVM Basic Block Representation.
void initializeDomOnlyViewerPass(PassRegistry &)
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)
std::string getNodeLabel(DomTreeNode *Node, DomTreeNode *Graph)
DomTreeNodeBase< NodeT > * getRootNode()
getRootNode - This returns the entry node for the CFG of the function.
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...
const Function * getParent() const
Return the enclosing method, or null if none.
FunctionPass * createPostDomOnlyViewerPass()
FunctionPass * createPostDomOnlyPrinterPass()
static std::string getGraphName(DominatorTree *DT)
DefaultDOTGraphTraits - This class provides the default implementations of all of the DOTGraphTraits ...
Legacy analysis pass which computes a DominatorTree.
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