LLVM  8.0.1
Classes | Functions
controlling options

These entry points control the ThinLTO cache. More...

Collaboration diagram for controlling options:

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. More...
 
void llvm::ThinLTOCodeGenerator::setCachePruningInterval (int Interval)
 Cache policy: interval (seconds) between two prunes of the cache. More...
 
void llvm::ThinLTOCodeGenerator::setCacheEntryExpiration (unsigned Expiration)
 Cache policy: expiration (in seconds) for an entry. More...
 
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. More...
 
void llvm::ThinLTOCodeGenerator::setCacheMaxSizeBytes (uint64_t MaxSizeBytes)
 Cache policy: the maximum size for the cache directory in bytes. More...
 
void llvm::ThinLTOCodeGenerator::setCacheMaxSizeFiles (unsigned MaxSizeFiles)
 Cache policy: the maximum number of files in the cache directory. More...
 

Detailed Description

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:

Function Documentation

◆ 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 150 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 164 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 190 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 197 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 155 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 182 of file ThinLTOCodeGenerator.h.