LLVM: controlling options (original) (raw)
These entry points control the ThinLTO cache. More...
| 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:
- The pruning interval limit the frequency at which the garbage collector will try to scan the cache directory to prune it from expired entries. Setting to -1 disable the pruning (default). Setting to 0 will force pruning to occur.
- The pruning expiration time indicates to the garbage collector how old an entry needs to be to be removed.
- Finally, the garbage collector can be instructed to prune the cache till the occupied space goes below a threshold.
◆ setCacheDir()
| void llvm::ThinLTOCodeGenerator::setCacheDir ( std::string Path) | inline |
|---|
Provide a path to a directory where to store the cached files for incremental build.
Definition at line 140 of file ThinLTOCodeGenerator.h.
◆ setCacheEntryExpiration()
| void llvm::ThinLTOCodeGenerator::setCacheEntryExpiration ( unsigned Expiration) | inline |
|---|
Cache policy: expiration (in seconds) for an entry.
A value of 0 will be ignored.
Definition at line 154 of file ThinLTOCodeGenerator.h.
◆ setCacheMaxSizeBytes()
| void llvm::ThinLTOCodeGenerator::setCacheMaxSizeBytes ( uint64_t MaxSizeBytes) | 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 180 of file ThinLTOCodeGenerator.h.
◆ setCacheMaxSizeFiles()
| void llvm::ThinLTOCodeGenerator::setCacheMaxSizeFiles ( unsigned MaxSizeFiles) | inline |
|---|
Cache policy: the maximum number of files in the cache directory.
A value of 0 will be ignored.
Definition at line 187 of file ThinLTOCodeGenerator.h.
◆ setCachePruningInterval()
| void llvm::ThinLTOCodeGenerator::setCachePruningInterval ( int Interval) | 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 145 of file ThinLTOCodeGenerator.h.
◆ setMaxCacheSizeRelativeToAvailableSpace()
| void llvm::ThinLTOCodeGenerator::setMaxCacheSizeRelativeToAvailableSpace ( unsigned Percentage) | 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 172 of file ThinLTOCodeGenerator.h.