summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DomPrinter.cpp
diff options
context:
space:
mode:
authorSean Fertile <sfertile@ca.ibm.com>2018-06-29 17:13:58 +0000
committerSean Fertile <sfertile@ca.ibm.com>2018-06-29 17:13:58 +0000
commit3b0535b424aca711375fa4e2a25c40509d6c6ed3 (patch)
tree95a4f46d923c0c9d8b13f305fbfe6884759a1125 /llvm/lib/Analysis/DomPrinter.cpp
parent8eeece38efaf0ef487ef43964a5884aa74a25286 (diff)
downloadbcm5719-llvm-3b0535b424aca711375fa4e2a25c40509d6c6ed3.tar.gz
bcm5719-llvm-3b0535b424aca711375fa4e2a25c40509d6c6ed3.zip
Extend CFGPrinter and CallPrinter with Heat Colors
Extends the CFGPrinter and CallPrinter with heat colors based on heuristics or profiling information. The colors are enabled by default and can be toggled on/off for CFGPrinter by using the option -cfg-heat-colors for both -dot-cfg[-only] and -view-cfg[-only]. Similarly, the colors can be toggled on/off for CallPrinter by using the option -callgraph-heat-colors for both -dot-callgraph and -view-callgraph. Patch by Rodrigo Caetano Rocha! Differential Revision: https://reviews.llvm.org/D40425 llvm-svn: 335996
Diffstat (limited to 'llvm/lib/Analysis/DomPrinter.cpp')
-rw-r--r--llvm/lib/Analysis/DomPrinter.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/DomPrinter.cpp b/llvm/lib/Analysis/DomPrinter.cpp
index 8abc0e7d0df..b1beb72234e 100644
--- a/llvm/lib/Analysis/DomPrinter.cpp
+++ b/llvm/lib/Analysis/DomPrinter.cpp
@@ -38,13 +38,12 @@ struct DOTGraphTraits<DomTreeNode*> : public DefaultDOTGraphTraits {
if (!BB)
return "Post dominance root node";
-
if (isSimple())
- return DOTGraphTraits<const Function*>
- ::getSimpleNodeLabel(BB, BB->getParent());
+ return DOTGraphTraits<CFGDOTInfo*>
+ ::getSimpleNodeLabel(BB, nullptr);
else
- return DOTGraphTraits<const Function*>
- ::getCompleteNodeLabel(BB, BB->getParent());
+ return DOTGraphTraits<CFGDOTInfo*>
+ ::getCompleteNodeLabel(BB, nullptr);
}
};
OpenPOWER on IntegriCloud