Refactor synthetic profile count computation. NFC.
authorEaswaran Raman <eraman@google.com>
Wed, 9 Jan 2019 20:10:27 +0000 (20:10 +0000)
committerEaswaran Raman <eraman@google.com>
Wed, 9 Jan 2019 20:10:27 +0000 (20:10 +0000)
commit116e08026ce9b30ed8f113e4c440ffb02774bb16
treeeb7ec878b4aafd1e153fbff29ca68327b86ba7e1
parent849dd13009b66470ad83e54dc5644003b8320145
Refactor synthetic profile count computation. NFC.

Summary:
Instead of using two separate callbacks to return the entry count and the
relative block frequency, use a single callback to return callsite
count. This would allow better supporting hybrid mode in the future as
the count of callsite need not always be derived from entry count (as in
sample PGO).

Reviewers: davidxl

Subscribers: mehdi_amini, steven_wu, dexonsmith, dang, llvm-commits

Differential Revision: https://reviews.llvm.org/D56464

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350755 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/SyntheticCountsUtils.h
lib/Analysis/SyntheticCountsUtils.cpp
lib/LTO/SummaryBasedOptimizations.cpp
lib/Transforms/IPO/SyntheticCountsPropagation.cpp