[PATCH] D73142: Heat Coloring for CFGPrinter and CallPrinter

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 16:07:45 PST 2020


davidxl added a comment.

is there call graph related test case?

Also some sample output file of the CFG and CallGraph with heat color will be helpful.



================
Comment at: llvm/include/llvm/Analysis/HeatUtils.h:28
+uint64_t
+getNumOfCalls(Function &callerFunction, Function &calledFunction,
+              function_ref<BlockFrequencyInfo *(Function &)> LookupBFI);
----------------
Add documentation.


================
Comment at: llvm/include/llvm/Analysis/HeatUtils.h:32
+uint64_t
+getNumOfCalls(CallSite &callsite,
+              function_ref<BlockFrequencyInfo *(Function &)> LookupBFI);
----------------
add documentation.  Similarly for other interfaces.


================
Comment at: llvm/lib/Analysis/CallPrinter.cpp:83
+      if (!CallMultiGraph) {
+        for (Function &Callee : *M) {
+          uint64_t Counter = getNumOfCalls(F, Callee, LookupBFI);
----------------
this quadratic behavior. 


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

https://reviews.llvm.org/D73142





More information about the llvm-commits mailing list