LLVM 20.0.0git
|
These entry points control the ThinLTO cache. More...
Classes | |
struct | llvm::ThinLTOCodeGenerator::CachingOptions |
Functions | |
void | llvm::ThinLTOCodeGenerator::setCacheDir (std::string Path) |
Provide a path to a directory where to store the cached files for incremental build. | |
void | llvm::ThinLTOCodeGenerator::setCachePruningInterval (int Interval) |
Cache policy: interval (seconds) between two prunes of the cache. | |
void | llvm::ThinLTOCodeGenerator::setCacheEntryExpiration (unsigned Expiration) |
Cache policy: expiration (in seconds) for an entry. | |
void | llvm::ThinLTOCodeGenerator::setMaxCacheSizeRelativeToAvailableSpace (unsigned Percentage) |
Sets the maximum cache size that can be persistent across build, in terms of percentage of the available space on the disk. | |
void | llvm::ThinLTOCodeGenerator::setCacheMaxSizeBytes (uint64_t MaxSizeBytes) |
Cache policy: the maximum size for the cache directory in bytes. | |
void | llvm::ThinLTOCodeGenerator::setCacheMaxSizeFiles (unsigned MaxSizeFiles) |
Cache policy: the maximum number of files in the cache directory. | |
These entry points control the ThinLTO cache.
The cache is intended to support incremental build, and thus needs to be persistent accross build. The client enabled the cache by supplying a path to an existing directory. The code generator will use this to store objects files that may be reused during a subsequent build. To avoid filling the disk space, a few knobs are provided:
|
inline |
Provide a path to a directory where to store the cached files for incremental build.
Definition at line 132 of file ThinLTOCodeGenerator.h.
References llvm::ThinLTOCodeGenerator::CachingOptions::Path.
|
inline |
Cache policy: expiration (in seconds) for an entry.
A value of 0 will be ignored.
Definition at line 146 of file ThinLTOCodeGenerator.h.
References llvm::CachePruningPolicy::Expiration, and llvm::ThinLTOCodeGenerator::CachingOptions::Policy.
|
inline |
Cache policy: the maximum size for the cache directory in bytes.
A value over the amount of available space on the disk will be reduced to the amount of available space. A value of 0 will be ignored.
Definition at line 172 of file ThinLTOCodeGenerator.h.
References llvm::CachePruningPolicy::MaxSizeBytes, and llvm::ThinLTOCodeGenerator::CachingOptions::Policy.
|
inline |
Cache policy: the maximum number of files in the cache directory.
A value of 0 will be ignored.
Definition at line 179 of file ThinLTOCodeGenerator.h.
References llvm::CachePruningPolicy::MaxSizeFiles, and llvm::ThinLTOCodeGenerator::CachingOptions::Policy.
|
inline |
Cache policy: interval (seconds) between two prunes of the cache.
Set to a negative value to disable pruning. A value of 0 will force pruning to occur.
Definition at line 137 of file ThinLTOCodeGenerator.h.
References llvm::CachePruningPolicy::Interval, and llvm::ThinLTOCodeGenerator::CachingOptions::Policy.
|
inline |
Sets the maximum cache size that can be persistent across build, in terms of percentage of the available space on the disk.
Set to 100 to indicate no limit, 50 to indicate that the cache size will not be left over half the available space. A value over 100 will be reduced to 100, and a value of 0 will be ignored.
The formula looks like: AvailableSpace = FreeSpace + ExistingCacheSize NewCacheSize = AvailableSpace * P/100
Definition at line 164 of file ThinLTOCodeGenerator.h.
References llvm::CachePruningPolicy::MaxSizePercentageOfAvailableSpace, and llvm::ThinLTOCodeGenerator::CachingOptions::Policy.