Expand description
Abstract link time optimization.
§ThinLTO
ThinLTO is designed to do LTO while requiring fewer resources than regular LTO. It can run much faster and in less memory (comparable to linking without LTO) than regular LTO, with essentially no loss in optimization.
Structs§
- LTOObject
Buffer - Type to wrap a single object returned by ThinLTO.
Enums§
- LLVM
OpaqueLTO Code Generator - LLVM
OpaqueLTO Input - LLVM
OpaqueLTO Module - LLVM
Opaque ThinLTO Code Generator - lto_
codegen_ diagnostic_ severity_ t - lto_
codegen_ model - lto_
debug_ model - lto_
symbol_ attributes
Functions§
- lto_
api_ ⚠version - Returns the runtime API version.
- lto_
codegen_ ⚠add_ module - lto_
codegen_ ⚠add_ must_ preserve_ symbol - lto_
codegen_ ⚠compile - lto_
codegen_ ⚠compile_ optimized - Generates code for the optimized merged module into one native object file.
- lto_
codegen_ ⚠compile_ to_ file - lto_
codegen_ ⚠create - lto_
codegen_ ⚠create_ in_ local_ context - lto_
codegen_ ⚠debug_ options - lto_
codegen_ ⚠debug_ options_ array - lto_
codegen_ ⚠dispose - lto_
codegen_ ⚠optimize - Runs optimization for the merged module.
- lto_
codegen_ ⚠set_ assembler_ args - lto_
codegen_ ⚠set_ assembler_ path - lto_
codegen_ ⚠set_ cpu - lto_
codegen_ ⚠set_ debug_ model - lto_
codegen_ ⚠set_ diagnostic_ handler - lto_
codegen_ ⚠set_ module - Sets the object module for code gneeration. This will transfer ownership of the module to the code generator.
- lto_
codegen_ ⚠set_ pic_ model - lto_
codegen_ ⚠set_ should_ embed_ uselists - Set whether to embed uselists in bitcode.
- lto_
codegen_ ⚠set_ should_ internalize - Sets if we should run the internalize pass during optimization and code generation.
- lto_
codegen_ ⚠write_ merged_ modules - lto_
get_ ⚠error_ message - lto_
get_ ⚠version - lto_
initialize_ ⚠disassembler - lto_
input_ ⚠create - Create an LTO input file from a buffer.
- lto_
input_ ⚠dispose - Free all memory allocated by the input file.
- lto_
input_ ⚠get_ dependent_ library - Get the
i
th dependent library specifier for the given input file. - lto_
input_ ⚠get_ num_ dependent_ libraries - Get the number of dependent library specifiers for the given input.
- lto_
module_ ⚠create - lto_
module_ ⚠create_ from_ fd - lto_
module_ ⚠create_ from_ fd_ at_ offset - lto_
module_ ⚠create_ from_ memory - lto_
module_ ⚠create_ from_ memory_ with_ path - lto_
module_ ⚠create_ in_ codegen_ context - lto_
module_ ⚠create_ in_ local_ context - lto_
module_ ⚠dispose - lto_
module_ ⚠get_ linkeropts - Returns the module’s linker options.
- lto_
module_ ⚠get_ macho_ cputype - lto_
module_ ⚠get_ num_ symbols - lto_
module_ ⚠get_ symbol_ attribute - lto_
module_ ⚠get_ symbol_ name - lto_
module_ ⚠get_ target_ triple - lto_
module_ ⚠has_ ctor_ dtor - Return true if the module has either the
@llvm.global_ctors
or the@llvm.global_dtors
symbol. - lto_
module_ ⚠has_ objc_ category - Return true if
Buffer
contains a bitcode file with ObjC code (category or class) in it. - lto_
module_ ⚠is_ object_ file - lto_
module_ ⚠is_ object_ file_ for_ target - lto_
module_ ⚠is_ object_ file_ in_ memory - Checks if a buffer is a loadable object file.
- lto_
module_ ⚠is_ object_ file_ in_ memory_ for_ target - lto_
module_ ⚠is_ thinlto - Test if a module has ThinLTO linking support.
- lto_
module_ ⚠set_ target_ triple - lto_
runtime_ ⚠lib_ symbols_ list - Return the list of libcall symbols that can be generated by LTO that might not be visible from the symbol table of bitcode files.
- lto_
set_ ⚠debug_ options - thinlto_
codegen_ ⚠add_ cross_ referenced_ symbol - Add a symbol to the list of global symbols that are cross-referenced between ThinLTO files.
- thinlto_
codegen_ ⚠add_ module - Add a module to a code generator.
- thinlto_
codegen_ ⚠add_ must_ preserve_ symbol - Add a symbol to the list of global symbols that must exist in the final generated code.
- thinlto_
codegen_ ⚠disable_ codegen - Disable code generation (running all stages until codegen).
- thinlto_
codegen_ ⚠dispose - Frees a code generator.
- thinlto_
codegen_ ⚠process - Optimize and codegen all modules attached to the code generator.
- thinlto_
codegen_ ⚠set_ cache_ dir - thinlto_
codegen_ ⚠set_ cache_ entry_ expiration - Set the expiration (in seconds) for cache entries.
- thinlto_
codegen_ ⚠set_ cache_ pruning_ interval - Set the cache pruning interval, in seconds.
- thinlto_
codegen_ ⚠set_ cache_ size_ bytes - Set 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.
- thinlto_
codegen_ ⚠set_ cache_ size_ files - Sets the maximum number of files in the cache directory. An unspecified default value will be applied. A value of 0 will be ignored.
- thinlto_
codegen_ ⚠set_ cache_ size_ megabytes - Same as thinlto_codegen_set_cache_size_bytes, except the maximum size is in megabytes (2^20 bytes).
- thinlto_
codegen_ ⚠set_ codegen_ only - Perform codegen only; disable all other stages.
- thinlto_
codegen_ ⚠set_ cpu - Set the CPU to generate code for.
- thinlto_
codegen_ ⚠set_ final_ cache_ size_ relative_ to_ available_ space - Set the maximum cache size to persist across builds.
- thinlto_
codegen_ ⚠set_ pic_ model - Set which PIC code model to generate.
- thinlto_
codegen_ ⚠set_ savetemps_ dir - Set the path to a directory to use as temporary bitcode storage.
- thinlto_
create_ ⚠codegen - Instantiates a ThinLTO code generator.
- thinlto_
debug_ ⚠options - Parse -mllvm style debug options.
- thinlto_
module_ ⚠get_ num_ object_ files - Return the number of object files produced by the code generator.
- thinlto_
module_ ⚠get_ num_ objects - Return the number of object files produced by the code generator.
- thinlto_
module_ ⚠get_ object - Return a reference to the
index
th object file produced by the code generator. - thinlto_
module_ ⚠get_ object_ file - Return the path to the ith output object file.
- thinlto_
set_ ⚠generated_ objects_ dir - Set the path to a directory to save generated object files.