LLVM 19.0.0git
Namespaces | Macros | Functions | Variables
CodeLayout.cpp File Reference
#include "llvm/Transforms/Utils/CodeLayout.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include <cmath>
#include <set>

Go to the source code of this file.

Namespaces

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

Macros

#define DEBUG_TYPE   "code-layout"
 

Functions

cl::opt< boolllvm::EnableExtTspBlockPlacement ("enable-ext-tsp-block-placement", cl::Hidden, cl::init(false), cl::desc("Enable machine block placement based on the ext-tsp model, " "optimizing I-cache utilization."))
 
cl::opt< boolllvm::ApplyExtTspWithoutProfile ("ext-tsp-apply-without-profile", cl::desc("Whether to apply ext-tsp placement for instances w/o profile"), cl::init(true), cl::Hidden)
 

Variables

static cl::opt< double > ForwardWeightCond ("ext-tsp-forward-weight-cond", cl::ReallyHidden, cl::init(0.1), cl::desc("The weight of conditional forward jumps for ExtTSP value"))
 
static cl::opt< double > ForwardWeightUncond ("ext-tsp-forward-weight-uncond", cl::ReallyHidden, cl::init(0.1), cl::desc("The weight of unconditional forward jumps for ExtTSP value"))
 
static cl::opt< double > BackwardWeightCond ("ext-tsp-backward-weight-cond", cl::ReallyHidden, cl::init(0.1), cl::desc("The weight of conditional backward jumps for ExtTSP value"))
 
static cl::opt< double > BackwardWeightUncond ("ext-tsp-backward-weight-uncond", cl::ReallyHidden, cl::init(0.1), cl::desc("The weight of unconditional backward jumps for ExtTSP value"))
 
static cl::opt< double > FallthroughWeightCond ("ext-tsp-fallthrough-weight-cond", cl::ReallyHidden, cl::init(1.0), cl::desc("The weight of conditional fallthrough jumps for ExtTSP value"))
 
static cl::opt< double > FallthroughWeightUncond ("ext-tsp-fallthrough-weight-uncond", cl::ReallyHidden, cl::init(1.05), cl::desc("The weight of unconditional fallthrough jumps for ExtTSP value"))
 
static cl::opt< unsignedForwardDistance ("ext-tsp-forward-distance", cl::ReallyHidden, cl::init(1024), cl::desc("The maximum distance (in bytes) of a forward jump for ExtTSP"))
 
static cl::opt< unsignedBackwardDistance ("ext-tsp-backward-distance", cl::ReallyHidden, cl::init(640), cl::desc("The maximum distance (in bytes) of a backward jump for ExtTSP"))
 
static cl::opt< unsignedMaxChainSize ("ext-tsp-max-chain-size", cl::ReallyHidden, cl::init(512), cl::desc("The maximum size of a chain to create"))
 
static cl::opt< unsignedChainSplitThreshold ("ext-tsp-chain-split-threshold", cl::ReallyHidden, cl::init(128), cl::desc("The maximum size of a chain to apply splitting"))
 
static cl::opt< double > MaxMergeDensityRatio ("ext-tsp-max-merge-density-ratio", cl::ReallyHidden, cl::init(100), cl::desc("The maximum ratio between densities of two chains for merging"))
 
static cl::opt< unsignedCacheEntries ("cdsort-cache-entries", cl::ReallyHidden, cl::desc("The size of the cache"))
 
static cl::opt< unsignedCacheSize ("cdsort-cache-size", cl::ReallyHidden, cl::desc("The size of a line in the cache"))
 
static cl::opt< unsignedCDMaxChainSize ("cdsort-max-chain-size", cl::ReallyHidden, cl::desc("The maximum size of a chain to create"))
 
static cl::opt< double > DistancePower ("cdsort-distance-power", cl::ReallyHidden, cl::desc("The power exponent for the distance-based locality"))
 
static cl::opt< double > FrequencyScale ("cdsort-frequency-scale", cl::ReallyHidden, cl::desc("The scale factor for the frequency-based locality"))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "code-layout"

Definition at line 53 of file CodeLayout.cpp.

Variable Documentation

◆ BackwardDistance

cl::opt< unsigned > BackwardDistance("ext-tsp-backward-distance", cl::ReallyHidden, cl::init(640), cl::desc("The maximum distance (in bytes) of a backward jump for ExtTSP")) ( "ext-tsp-backward-distance"  ,
cl::ReallyHidden  ,
cl::init(640)  ,
cl::desc("The maximum distance (in bytes) of a backward jump for ExtTSP")   
)
static

◆ BackwardWeightCond

cl::opt< double > BackwardWeightCond("ext-tsp-backward-weight-cond", cl::ReallyHidden, cl::init(0.1), cl::desc("The weight of conditional backward jumps for ExtTSP value")) ( "ext-tsp-backward-weight-cond"  ,
cl::ReallyHidden  ,
cl::init(0.1)  ,
cl::desc("The weight of conditional backward jumps for ExtTSP value")   
)
static

◆ BackwardWeightUncond

cl::opt< double > BackwardWeightUncond("ext-tsp-backward-weight-uncond", cl::ReallyHidden, cl::init(0.1), cl::desc("The weight of unconditional backward jumps for ExtTSP value")) ( "ext-tsp-backward-weight-uncond"  ,
cl::ReallyHidden  ,
cl::init(0.1)  ,
cl::desc("The weight of unconditional backward jumps for ExtTSP value")   
)
static

◆ CacheEntries

cl::opt< unsigned > CacheEntries("cdsort-cache-entries", cl::ReallyHidden, cl::desc("The size of the cache")) ( "cdsort-cache-entries"  ,
cl::ReallyHidden  ,
cl::desc("The size of the cache")   
)
static

◆ CacheSize

cl::opt< unsigned > CacheSize("cdsort-cache-size", cl::ReallyHidden, cl::desc("The size of a line in the cache")) ( "cdsort-cache-size"  ,
cl::ReallyHidden  ,
cl::desc("The size of a line in the cache")   
)
static

◆ CDMaxChainSize

cl::opt< unsigned > CDMaxChainSize("cdsort-max-chain-size", cl::ReallyHidden, cl::desc("The maximum size of a chain to create")) ( "cdsort-max-chain-size"  ,
cl::ReallyHidden  ,
cl::desc("The maximum size of a chain to create")   
)
static

◆ ChainSplitThreshold

cl::opt< unsigned > ChainSplitThreshold("ext-tsp-chain-split-threshold", cl::ReallyHidden, cl::init(128), cl::desc("The maximum size of a chain to apply splitting")) ( "ext-tsp-chain-split-threshold"  ,
cl::ReallyHidden  ,
cl::init(128)  ,
cl::desc("The maximum size of a chain to apply splitting")   
)
static

◆ DistancePower

cl::opt< double > DistancePower("cdsort-distance-power", cl::ReallyHidden, cl::desc("The power exponent for the distance-based locality")) ( "cdsort-distance-power"  ,
cl::ReallyHidden  ,
cl::desc("The power exponent for the distance-based locality")   
)
static

◆ FallthroughWeightCond

cl::opt< double > FallthroughWeightCond("ext-tsp-fallthrough-weight-cond", cl::ReallyHidden, cl::init(1.0), cl::desc("The weight of conditional fallthrough jumps for ExtTSP value")) ( "ext-tsp-fallthrough-weight-cond"  ,
cl::ReallyHidden  ,
cl::init(1.0)  ,
cl::desc("The weight of conditional fallthrough jumps for ExtTSP value")   
)
static

◆ FallthroughWeightUncond

cl::opt< double > FallthroughWeightUncond("ext-tsp-fallthrough-weight-uncond", cl::ReallyHidden, cl::init(1.05), cl::desc("The weight of unconditional fallthrough jumps for ExtTSP value")) ( "ext-tsp-fallthrough-weight-uncond"  ,
cl::ReallyHidden  ,
cl::init(1.05)  ,
cl::desc("The weight of unconditional fallthrough jumps for ExtTSP value")   
)
static

◆ ForwardDistance

cl::opt< unsigned > ForwardDistance("ext-tsp-forward-distance", cl::ReallyHidden, cl::init(1024), cl::desc("The maximum distance (in bytes) of a forward jump for ExtTSP")) ( "ext-tsp-forward-distance"  ,
cl::ReallyHidden  ,
cl::init(1024)  ,
cl::desc("The maximum distance (in bytes) of a forward jump for ExtTSP")   
)
static

◆ ForwardWeightCond

cl::opt< double > ForwardWeightCond("ext-tsp-forward-weight-cond", cl::ReallyHidden, cl::init(0.1), cl::desc("The weight of conditional forward jumps for ExtTSP value")) ( "ext-tsp-forward-weight-cond"  ,
cl::ReallyHidden  ,
cl::init(0.1)  ,
cl::desc("The weight of conditional forward jumps for ExtTSP value")   
)
static

◆ ForwardWeightUncond

cl::opt< double > ForwardWeightUncond("ext-tsp-forward-weight-uncond", cl::ReallyHidden, cl::init(0.1), cl::desc("The weight of unconditional forward jumps for ExtTSP value")) ( "ext-tsp-forward-weight-uncond"  ,
cl::ReallyHidden  ,
cl::init(0.1)  ,
cl::desc("The weight of unconditional forward jumps for ExtTSP value")   
)
static

◆ FrequencyScale

cl::opt< double > FrequencyScale("cdsort-frequency-scale", cl::ReallyHidden, cl::desc("The scale factor for the frequency-based locality")) ( "cdsort-frequency-scale"  ,
cl::ReallyHidden  ,
cl::desc("The scale factor for the frequency-based locality")   
)
static

◆ MaxChainSize

cl::opt< unsigned > MaxChainSize("ext-tsp-max-chain-size", cl::ReallyHidden, cl::init(512), cl::desc("The maximum size of a chain to create")) ( "ext-tsp-max-chain-size"  ,
cl::ReallyHidden  ,
cl::init(512)  ,
cl::desc("The maximum size of a chain to create")   
)
static

◆ MaxMergeDensityRatio

cl::opt< double > MaxMergeDensityRatio("ext-tsp-max-merge-density-ratio", cl::ReallyHidden, cl::init(100), cl::desc("The maximum ratio between densities of two chains for merging")) ( "ext-tsp-max-merge-density-ratio"  ,
cl::ReallyHidden  ,
cl::init(100)  ,
cl::desc("The maximum ratio between densities of two chains for merging")   
)
static