llvm::ThinLTOCodeGenerator

Interface similar to LTOCodeGenerator, adapted for ThinLTO processing.

Synopsis

Declared in <llvm/LTO/legacy/ThinLTOCodeGenerator.h>

class ThinLTOCodeGenerator;

Description

The ThinLTOCodeGenerator is not intended to be reused for multiple compilation: the model is that the client adds modules to the generator and ask to perform the ThinLTO optimizations / codegen, and finally destroys the codegenerator.

Types

NameDescription
CachingOptions Options controlling ThinLTO object-file caching.

Member Functions

NameDescription
addModule Add given module to the code generator.
crossModuleImport Perform cross-module importing for the module identified by ModuleIdentifier.
crossReferenceSymbol Adds a global symbol that is cross-referenced between ThinLTO files.
disableCodeGen Disable CodeGen, only run the stages till codegen and stop. The output will be bitcode.
emitImports Compute and emit the imported files for module at ModulePath.
gatherImportedSummariesForModule Compute the list of summaries and the subset of declaration summaries needed for importing into module.
getProducedBinaries Return the in-memory binaries produced by the code generator.
getProducedBinaryFiles Return the on-disk binaries produced by the code generator.
internalize Perform internalization. Index is updated to reflect linkage changes.
linkCombinedIndex Produce the combined summary index from all the bitcode files: "thin-link".
optimize Perform post-importing ThinLTO optimizations.
preserveSymbol Adds a global symbol that must exist in the final generated code.
promote Promote and rename exported internal functions, and resolve weak symbols.
run Process all the modules that were added to the code generator in parallel.
setAttr Subtarget attributes
setCacheDir Provide a path to a directory where to store the cached files for incremental build.
setCacheEntryExpiration Cache policy: expiration (in seconds) for an entry. A value of 0 will be ignored.
setCacheMaxSizeBytes Set the maximum size for the cache directory in bytes.
setCacheMaxSizeFiles Cache policy: the maximum number of files in the cache directory. A value of 0 will be ignored.
setCachePruningInterval Cache policy: interval (seconds) between two prunes of the cache. Set to a negative value to disable pruning. A value of 0 will force pruning to occur.
setCodeGenOnly Perform CodeGen only: disable all other stages.
setCodeGenOptLevel CodeGen optimization level
setCodePICModel CodeModel
setCpu CPU to use to initialize the TargetMachine
setDebugPassManager Enable or disable debug output for the new pass manager.
setFreestanding Enable the Freestanding mode: indicate that the optimizer should not assume builtins are present on the target.
setGeneratedObjectsDirectory Set the directory where generated object files are saved.
setMaxCacheSizeRelativeToAvailableSpace Set the maximum cache size as a percentage of available disk space.
setMllvmArgs Set the -mllvm arguments to include in the cache key.
setOptLevel IR optimization level: from 0 to 3.
setSaveTempsDir Set the path to a directory where to save temporaries at various stages of the processing.
setTargetOptions TargetMachine options
writeGeneratedObject Write a generated object file and optionally link it into the cache.