LLVM 20.0.0git
Classes | Namespaces | Typedefs | Functions
CodeLayout.h File Reference

Declares methods and data structures for code layout algorithms. More...

#include "llvm/ADT/ArrayRef.h"
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  llvm::codelayout::EdgeCount
 
struct  llvm::codelayout::CDSortConfig
 Algorithm-specific params for Cache-Directed Sort. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::codelayout
 

Typedefs

using llvm::codelayout::EdgeT = std::pair< uint64_t, uint64_t >
 

Functions

std::vector< uint64_tllvm::codelayout::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-cache utilization.
 
double llvm::codelayout::calcExtTspScore (ArrayRef< uint64_t > Order, ArrayRef< uint64_t > NodeSizes, ArrayRef< uint64_t > NodeCounts, ArrayRef< EdgeCount > EdgeCounts)
 Estimate the "quality" of a given node order in CFG.
 
double llvm::codelayout::calcExtTspScore (ArrayRef< uint64_t > NodeSizes, ArrayRef< uint64_t > NodeCounts, ArrayRef< EdgeCount > EdgeCounts)
 Estimate the "quality" of the current node order in CFG.
 
std::vector< uint64_tllvm::codelayout::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.
 
std::vector< uint64_tllvm::codelayout::computeCacheDirectedLayout (const CDSortConfig &Config, ArrayRef< uint64_t > FuncSizes, ArrayRef< uint64_t > FuncCounts, ArrayRef< EdgeCount > CallCounts, ArrayRef< uint64_t > CallOffsets)
 Apply a Cache-Directed Sort with a custom config.
 

Detailed Description

Declares methods and data structures for code layout algorithms.

Definition in file CodeLayout.h.