[PATCH] D74346: Flags for displaying only hot nodes in CFGPrinter graph

Kirill Naumov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 10:27:59 PST 2020


knaumov created this revision.
knaumov added reviewers: apilipenko, fedor.sergeev, davidxl, eraman, efriedma.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Added flags to display only the hot nodes (nodes who have at least one a successor who doesn't end 
in deopt or unreachable) in the CFGPrinter graph. Before displaying the graph, the first run of the
function isNodeHidden launches a check for every BB in the graph on a matter of being hidden. 
Before answering, each node and its successors are being checked for ending in deopt or unreachable
and verified with the corresponding flags ("cfg-hide-unreachable-paths" and "cfg-hide-deoptimize-paths")
being turned on. If the leaf node is such as described before, it is marked to be not shown in the graph.
If any node has all of its successors not being shown, this node is automatically not shown as well. This
check uses post-order traversal to make sure that all of the successors already have been visited before
making the analysis for the said node.


https://reviews.llvm.org/D74346

Files:
  llvm/include/llvm/Analysis/CFGPrinter.h
  llvm/lib/Analysis/CFGPrinter.cpp
  llvm/test/Transforms/Inline/cfg_deopt_unreach.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74346.243605.patch
Type: text/x-patch
Size: 6172 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200210/918ac628/attachment.bin>


More information about the llvm-commits mailing list