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

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 13:52:52 PDT 2017


danielcdh created this revision.
Herald added subscribers: aprantl, sanjoy.

In the current implementation, we only have accurate profile count for standalone symbols. For inlined functions, we do not have entry count data because it's not available in LBR. In this patch, we use the first instruction's frequency to estimiate the function's entry count, especially for inlined functions. This may be inaccurate due to debug info in optimized code. However, this is a better estimate than the static 80/20 estimation we have in the current implementation.


https://reviews.llvm.org/D38478

Files:
  include/llvm/IR/CallSite.h
  include/llvm/ProfileData/SampleProf.h
  lib/Transforms/IPO/SampleProfile.cpp
  test/Transforms/SampleProfile/Inputs/indirect-call.prof
  test/Transforms/SampleProfile/indirect-call.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38478.117420.patch
Type: text/x-patch
Size: 9933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171002/7ab16354/attachment.bin>


More information about the llvm-commits mailing list