[ThinLTO]Allow setting of maximum cache size with 64-bit number
authorJames Henderson <jh7370@my.bristol.ac.uk>
Fri, 14 Sep 2018 12:51:19 +0000 (12:51 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Fri, 14 Sep 2018 12:51:19 +0000 (12:51 +0000)
commit48c0688a36b06950f681cbf4c0f79e16e5c4a403
tree3dbbf0163282b2b4efb36a27639a26cebc0f75cf
parent0ae00567ba50f90cdcfc6216c4394fe7fdcf41b1
[ThinLTO]Allow setting of maximum cache size with 64-bit number

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: 342233
llvm/include/llvm-c/lto.h
llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h
llvm/test/ThinLTO/X86/cache.ll
llvm/tools/llvm-lto/llvm-lto.cpp
llvm/tools/lto/lto.cpp
llvm/tools/lto/lto.exports