LLVM: include/llvm/Transforms/Utils/CodeLayout.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_TRANSFORMS_UTILS_CODELAYOUT_H
15#define LLVM_TRANSFORMS_UTILS_CODELAYOUT_H
16
19
20#include
21#include
22
24
25using EdgeT = std::pair<uint64_t, uint64_t>;
26
32
33
34
35
36
37
38
39
40
41
42
43
47
48
49
50
51
55
56
59
60
61
74
75
76
77
78
79
80
81
82
83
87
88
93
94}
95
96#endif
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition CodeLayout.h:23
LLVM_ABI std::vector< uint64_t > computeCacheDirectedLayout(ArrayRef< uint64_t > FuncSizes, ArrayRef< uint64_t > FuncCounts, ArrayRef< EdgeCount > CallCounts, ArrayRef< uint64_t > CallOffsets)
Apply a Cache-Directed Sort for functions represented by a call graph.
LLVM_ABI double calcExtTspScore(ArrayRef< uint64_t > Order, ArrayRef< uint64_t > NodeSizes, ArrayRef< EdgeCount > EdgeCounts)
Estimate the "quality" of a given node order in CFG.
std::pair< uint64_t, uint64_t > EdgeT
Definition CodeLayout.h:25
LLVM_ABI std::vector< uint64_t > computeExtTspLayout(ArrayRef< uint64_t > NodeSizes, ArrayRef< uint64_t > NodeCounts, ArrayRef< EdgeCount > EdgeCounts)
Find a layout of nodes (basic blocks) of a given CFG optimizing jump locality and thus processor I-ca...
Algorithm-specific params for Cache-Directed Sort.
Definition CodeLayout.h:62
unsigned MaxChainSize
The maximum size of a chain to create.
Definition CodeLayout.h:68
unsigned CacheSize
The size of a line in the cache.
Definition CodeLayout.h:66
double DistancePower
The power exponent for the distance-based locality.
Definition CodeLayout.h:70
double FrequencyScale
The scale factor for the frequency-based locality.
Definition CodeLayout.h:72
unsigned CacheEntries
The size of the cache.
Definition CodeLayout.h:64
Definition CodeLayout.h:27
uint64_t count
Definition CodeLayout.h:30
uint64_t src
Definition CodeLayout.h:28
uint64_t dst
Definition CodeLayout.h:29