[PATCH] D38478: Use the first instruction's count to estimate the funciton's entry frequency.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 08:06:02 PDT 2017


tejohnson added inline comments.


================
Comment at: include/llvm/ProfileData/SampleProf.h:317
+      uint64_t T = 0;
+      // A callsite may be promoted to several inlined direct calls. We need
+      // to get the sum of them.
----------------
"An indirect callsite may be..."?


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:1268
+          findIndirectCallFunctionSamples(I, Sum);
           annotateValueSite(*I.getParent()->getParent()->getParent(), I,
                             SortedCallTargets, Sum, IPVK_IndirectCallTarget,
----------------
Is this annotated the value profile before or after promotion/inlining of the indirect calls recorded as inlined in the profile? If after, not sure why we want to include the counts of the promoted/inlined targets in Sum (which AFAICT is what will happen by computing Sum via findIndirectCallFunctionSamples).


https://reviews.llvm.org/D38478





More information about the llvm-commits mailing list