ΒΆstd::vector<uint64_t> applyExtTspLayout(
const std::vector<uint64_t>& NodeSizes,
const std::vector<uint64_t>& NodeCounts,
const DenseMap<std::pair<uint64_t, uint64_t>,
uint64_t>& EdgeCounts)
std::vector<uint64_t> applyExtTspLayout(
const std::vector<uint64_t>& NodeSizes,
const std::vector<uint64_t>& NodeCounts,
const DenseMap<std::pair<uint64_t, uint64_t>,
uint64_t>& EdgeCounts)
Description
Find a layout of nodes (basic blocks) of a given CFG optimizing jump locality and thus processor I-cache utilization. This is achieved via increasing the number of fall-through jumps and co-locating frequently executed nodes together. The nodes are assumed to be indexed by integers from [0, |V|) so that the current order is the identity permutation.\p NodeSizes: The sizes of the nodes (in bytes).\p NodeCounts: The execution counts of the nodes in the profile.\p EdgeCounts: The execution counts of every edge (jump) in the profile. The map also defines the edges in CFG and should include 0-count edges.
Declared at: llvm/include/llvm/Transforms/Utils/CodeLayout.h:34
Parameters
- const std::vector<uint64_t>& NodeSizes
- const std::vector<uint64_t>& NodeCounts
- const DenseMap<std::pair<uint64_t, uint64_t>, uint64_t>& EdgeCounts
Returns
The best block order found.