summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2018-09-17 10:21:26 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2018-09-17 10:21:26 +0000
commite29e40854b6eb266b9e983d47b4121e9d4a304b4 (patch)
tree6683cdf8b84cd9dc6c818b78feb69603927a44d4 /llvm/include/llvm-c
parentc704f4d5615ba512aafe85e7b2898d5335608d3e (diff)
downloadbcm5719-llvm-e29e40854b6eb266b9e983d47b4121e9d4a304b4.tar.gz
bcm5719-llvm-e29e40854b6eb266b9e983d47b4121e9d4a304b4.zip
Reland r342233: [ThinLTO] Allow setting of maximum cache size with 64-bit number
The original was reverted due to an apparent build-bot test failure, but it looks like this is just a flaky test. Also added a C-interface function for large values, and updated llvm-lto's --thinlto-cache-max-size-bytes switch to take a type larger than int. The maximum cache size in terms of bytes is a 64-bit number. However, the methods to set it only took unsigned previously, which meant that the maximum cache size could not be specified above 4GB. That's quite small compared to the output of some projects, so it makes sense to provide the ability to set larger values in that field. We also needed a C-interface function that provides a greater range than the existing thinlto_codegen_set_cache_size_bytes, which also only takes an unsigned, so this change also adds hinlto_codegen_set_cache_size_megabytes. Reviewed by: mehdi_amini, tejohnson, steven_wu Differential Revision: https://reviews.llvm.org/D52023 llvm-svn: 342366
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r--llvm/include/llvm-c/lto.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h
index 1acd610f70a..090cd34af4e 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 22
+#define LTO_API_VERSION 23
/**
* \since prior to LTO_API_VERSION=3
@@ -828,6 +828,16 @@ extern void thinlto_codegen_set_cache_size_bytes(thinlto_code_gen_t cg,
unsigned max_size_bytes);
/**
+ * Same as thinlto_codegen_set_cache_size_bytes, except the maximum size is in
+ * megabytes (2^20 bytes).
+ *
+ * \since LTO_API_VERSION=23
+ */
+extern void
+thinlto_codegen_set_cache_size_megabytes(thinlto_code_gen_t cg,
+ unsigned max_size_megabytes);
+
+/**
* Sets the maximum number of files in the cache directory. An unspecified
* default value will be applied. A value of 0 will be ignored.
*
OpenPOWER on IntegriCloud