[PATCH] D52845: Update entry count for cold calls

David Callahan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 3 13:47:39 PDT 2018


david2050 created this revision.
Herald added subscribers: llvm-commits, eraman.

Profile sample files include the number of times each entry or inlined
call site is sampled. This is translated into the entry count metadta
on functions.

When sample data is being read, if a call site that was inlined
in the sample program is considered cold and not inlined, then
the entry count of the out-of-line functions does not reflect
the current compilation.

In this patch, we note call sites where the function was not inlined
and as a last action of the sample profile loading, we update the
called function's entry count to reflect the calls from these
call sites which are not included in the profile file.


Repository:
  rL LLVM

https://reviews.llvm.org/D52845

Files:
  lib/Transforms/IPO/SampleProfile.cpp
  test/Transforms/SampleProfile/Inputs/inline-cold.prof
  test/Transforms/SampleProfile/inline-cold.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52845.168165.patch
Type: text/x-patch
Size: 8174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181003/c6092a09/attachment.bin>


More information about the llvm-commits mailing list