diff options
author | Ekaterina Romanova <katya_romanova@playstation.sony.com> | 2018-03-02 03:51:27 +0000 |
---|---|---|
committer | Ekaterina Romanova <katya_romanova@playstation.sony.com> | 2018-03-02 03:51:27 +0000 |
commit | b8aeec46b7fb0a88c74208a577dc0b441ed03cfe (patch) | |
tree | d7cd269c038895a557cb5fdc49619fe0bd8e6ec8 /llvm/include/llvm-c | |
parent | dfcd846b2632a8d67653e39197c4cb3d0ef70016 (diff) | |
download | bcm5719-llvm-b8aeec46b7fb0a88c74208a577dc0b441ed03cfe.tar.gz bcm5719-llvm-b8aeec46b7fb0a88c74208a577dc0b441ed03cfe.zip |
[ThinLTO] Added a couple of C LTO API interfaces to control the cache policy.
- thinlto_codegen_set_cache_size_bytes to control the absolute size of cache directory.
- thinlto_codegen_set_cache_size_files the size and amount of files in cache directory.
These functions have been supported in C++ LTO API for a long time, but were absent in C LTO API.
Differential Revision: https://reviews.llvm.org/D42446
llvm-svn: 326537
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r-- | llvm/include/llvm-c/lto.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h index 4eee5f1f113..65d172dea18 100644 --- a/llvm/include/llvm-c/lto.h +++ b/llvm/include/llvm-c/lto.h @@ -44,7 +44,7 @@ typedef bool lto_bool_t; * @{ */ -#define LTO_API_VERSION 21 +#define LTO_API_VERSION 22 /** * \since prior to LTO_API_VERSION=3 @@ -817,6 +817,28 @@ extern void thinlto_codegen_set_cache_entry_expiration(thinlto_code_gen_t cg, unsigned expiration); /** + * Sets the maximum size of 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. An unspecified default value will be applied. A value of 0 + * will be ignored. + * + * \since LTO_API_VERSION=22 + */ +extern void thinlto_codegen_set_cache_size_bytes(thinlto_code_gen_t cg, + unsigned max_size_bytes); + +/** + * Sets the maximum number of files in the cache directory. An unspecified + * default value will be applied. A value of 0 will be ignored. + * + * \since LTO_API_VERSION=22 + */ +extern void thinlto_codegen_set_cache_size_files(thinlto_code_gen_t cg, + unsigned max_size_files); + + + +/** * @} // endgroup LLVMCTLTO_CACHING */ |