diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-01 06:47:02 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-01 06:47:02 +0000 |
commit | 43b657b5c7440c5b85b031732fb0281fdfa07560 (patch) | |
tree | 33c772f218d1097746395b0d474299a4c18b6c4a /llvm/include/llvm-c/lto.h | |
parent | f8b592f213816911adcd9c2e86a04d007ef3f6b1 (diff) | |
download | bcm5719-llvm-43b657b5c7440c5b85b031732fb0281fdfa07560.tar.gz bcm5719-llvm-43b657b5c7440c5b85b031732fb0281fdfa07560.zip |
Add a libLTO API to stop/restart ThinLTO between optimizations and CodeGen
This allows the linker to instruct ThinLTO to perform only the
optimization part or only the codegen part of the process.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265113
Diffstat (limited to 'llvm/include/llvm-c/lto.h')
-rw-r--r-- | llvm/include/llvm-c/lto.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h index 42c280210a2..82f7fd74178 100644 --- a/llvm/include/llvm-c/lto.h +++ b/llvm/include/llvm-c/lto.h @@ -44,7 +44,8 @@ typedef bool lto_bool_t; * @{ */ -#define LTO_API_VERSION 18 +#define LTO_API_VERSION 19 + /** * \since prior to LTO_API_VERSION=3 */ @@ -718,6 +719,23 @@ extern void thinlto_codegen_set_savetemps_dir(thinlto_code_gen_t cg, extern void thinlto_codegen_set_cpu(thinlto_code_gen_t cg, const char *cpu); /** + * Disable CodeGen, only run the stages till codegen and stop. The output will + * be bitcode. + * + * \since LTO_API_VERSION=19 + */ +extern void thinlto_codegen_disable_codegen(thinlto_code_gen_t cg, + lto_bool_t disable); + +/** + * Perform CodeGen only: disable all other stages. + * + * \since LTO_API_VERSION=19 + */ +extern void thinlto_codegen_set_codegen_only(thinlto_code_gen_t cg, + lto_bool_t codegen_only); + +/** * Parse -mllvm style debug options. * * \since LTO_API_VERSION=18 |