Go to the documentation of this file.
24 cl::desc(
"Synthesize entry counts based on the summary"));
31 auto Root =
Index.calculateCallGraphRoot();
37 for (
auto &
C : Root.calls()) {
39 for (
auto &GVS : V.getSummaryList()) {
40 auto S = GVS.get()->getBaseObject();
41 auto *
F = cast<FunctionSummary>(
S);
57 if (V.getSummaryList().size()) {
58 auto S = V.getSummaryList().front()->getBaseObject();
59 auto *
F = cast<FunctionSummary>(
S);
60 return F->entryCount();
69 auto S = GVS.get()->getBaseObject();
70 auto *
F = cast<FunctionSummary>(
S);
77 auto RelFreq = GetCallSiteRelFreq(Edge);
87 Index.setHasSyntheticEntryCounts();
ArrayRef< std::unique_ptr< GlobalValueSummary > > getSummaryList() const
This is an optimization pass for GlobalISel generic memory operations.
std::enable_if_t< std::is_unsigned< T >::value, T > SaturatingAdd(T X, T Y, bool *ResultOverflowed=nullptr)
Add two unsigned integers, X and Y, of type T.
static void propagate(const CallGraphType &CG, GetProfCountTy GetProfCount, AddCountTy AddCount)
Propgate synthetic entry counts on a callgraph CG.
static void initializeCounts(ModuleSummaryIndex &Index)
std::pair< ValueInfo, CalleeInfo > EdgeTy
<CalleeValueInfo, CalleeInfo> call edge pair.
(vector float) vec_cmpeq(*A, *B) C
void computeSyntheticCounts(ModuleSummaryIndex &Index)
Compute synthetic function entry counts.
Struct that holds a reference to a particular GUID in a global value summary.
initializer< Ty > init(const Ty &Val)
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
cl::opt< int > InitialSyntheticCount
ScaledNumber< uint64_t > Scaled64
static cl::opt< bool > ThinLTOSynthesizeEntryCounts("thinlto-synthesize-entry-counts", cl::init(false), cl::Hidden, cl::desc("Synthesize entry counts based on the summary"))
Class to hold module path string table and global value map, and encapsulate methods for operating on...
static constexpr int32_t ScaleShift