[PATCH] D73142: Heat Coloring for CFGPrinter and CallPrinter

Kirill Naumov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 11:25:55 PST 2020


knaumov updated this revision to Diff 246262.
knaumov added a comment.

Changes:

- Renamed a flag ("callgraph-full" -> "call-multigraph") to reflect its purpose more clearly
- Removed unnecessary if-check
- General refactoring and restructuring
- Removed useHeuristic from the code - from the structure of the code it is vivid that useHeuristic variable used in getMaxFreq functions is always set to "true" and never becomes "false".

Addressing @davidxl  's comments:
ProfileSummaryInfo class will not be useful in this problem as it only gives the result on
whether the BB or the Function is hot or cold, without information on how hot or cold
it is when compared to the other BBs or Functions.
On the other hand, I agree with the fact that comparing local maximum BB frequencies
in function throughout the module is useless and can be misleading. However, I don't
see any "nice" way out of that, as the solution that you suggested (SyntheticCountsPropagation pass)
involves altering the module which should be avoided in a diagnostical pass. Also, as CallGraphs
are printed per function, there is no worry that the colors are going to be somewhat misleading.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73142/new/

https://reviews.llvm.org/D73142

Files:
  llvm/include/llvm/Analysis/CFGPrinter.h
  llvm/include/llvm/Analysis/HeatUtils.h
  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
  llvm/lib/Analysis/RegionPrinter.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/lib/Transforms/Scalar/NewGVN.cpp
  llvm/test/Other/2007-06-05-PassID.ll
  llvm/test/Other/cfg-printer-branch-weights-percent.ll
  llvm/test/Other/cfg-printer-branch-weights.ll
  polly/lib/Analysis/ScopGraphPrinter.cpp
  polly/lib/Support/RegisterPasses.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73142.246262.patch
Type: text/x-patch
Size: 66755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200224/fc9be561/attachment.bin>


More information about the llvm-commits mailing list