[PATCH] D40425: Extending CFGPrinter and CallPrinter with Heat Colors
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 4 10:52:41 PST 2017
davidxl added inline comments.
================
Comment at: lib/Analysis/CallPrinter.cpp:61
+ function_ref<BlockFrequencyInfo *(Function &)> LookupBFI) {
+ this->M = M;
+ this->CG = CG;
----------------
clang-format
================
Comment at: lib/Analysis/CallPrinter.cpp:219
+ static const unsigned MaxEdgeWidth = 3;
+
+ Function *Caller = Node->getFunction();
----------------
clang-format
================
Comment at: lib/Analysis/CallPrinter.cpp:222
+ if (Caller == nullptr || Caller->isDeclaration())
+ return "";
+
----------------
clang-format
================
Comment at: lib/Analysis/HeatUtils.cpp:70
+ auto CS = CallSite(U);
+ if (CS.getCaller()==(&callerFunction)) {
+ counter += getNumOfCalls(CS,LookupBFI);
----------------
clang-format
Repository:
rL LLVM
https://reviews.llvm.org/D40425
More information about the llvm-commits
mailing list