Extend CFGPrinter and CallPrinter with Heat Colors
authorSean Fertile <sfertile@ca.ibm.com>
Fri, 29 Jun 2018 17:13:58 +0000 (17:13 +0000)
committerSean Fertile <sfertile@ca.ibm.com>
Fri, 29 Jun 2018 17:13:58 +0000 (17:13 +0000)
commit3b0535b424aca711375fa4e2a25c40509d6c6ed3
tree95a4f46d923c0c9d8b13f305fbfe6884759a1125
parent8eeece38efaf0ef487ef43964a5884aa74a25286
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
12 files changed:
llvm/include/llvm/Analysis/CFGPrinter.h
llvm/include/llvm/Analysis/HeatUtils.h [new file with mode: 0644]
llvm/lib/Analysis/CFGPrinter.cpp
llvm/lib/Analysis/CMakeLists.txt
llvm/lib/Analysis/CallPrinter.cpp
llvm/lib/Analysis/DomPrinter.cpp
llvm/lib/Analysis/HeatUtils.cpp [new file with mode: 0644]
llvm/lib/Analysis/RegionPrinter.cpp
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/Scalar/NewGVN.cpp
llvm/llvm/Analysis/HeatUtils.h [new file with mode: 0644]
llvm/test/Other/2007-06-05-PassID.ll