LLVM  8.0.1
Typedefs | Enumerations | Functions
Link Time Optimization
Collaboration diagram for Link Time Optimization:

Typedefs

typedef void * llvm_lto_t
 This provides a dummy type for pointers to the LTO object. More...
 
typedef enum llvm_lto_status llvm_lto_status_t
 This provides a C-visible enumerator to manage status codes. More...
 

Enumerations

enum  llvm_lto_status {
  LLVM_LTO_UNKNOWN, LLVM_LTO_OPT_SUCCESS, LLVM_LTO_READ_SUCCESS, LLVM_LTO_READ_FAILURE,
  LLVM_LTO_WRITE_FAILURE, LLVM_LTO_NO_TARGET, LLVM_LTO_NO_WORK, LLVM_LTO_MODULE_MERGE_FAILURE,
  LLVM_LTO_ASM_FAILURE, LLVM_LTO_NULL_OBJECT
}
 This provides a C-visible enumerator to manage status codes. More...
 

Functions

llvm_lto_t llvm_create_optimizer (void)
 This provides C interface to initialize link time optimizer. More...
 
void llvm_destroy_optimizer (llvm_lto_t lto)
 
llvm_lto_status_t llvm_read_object_file (llvm_lto_t lto, const char *input_filename)
 
llvm_lto_status_t llvm_optimize_modules (llvm_lto_t lto, const char *output_filename)
 

Detailed Description

Typedef Documentation

◆ llvm_lto_status_t

This provides a C-visible enumerator to manage status codes.

This should map exactly onto the C++ enumerator LTOStatus.

◆ llvm_lto_t

typedef void* llvm_lto_t

This provides a dummy type for pointers to the LTO object.

Definition at line 31 of file LinkTimeOptimizer.h.

Enumeration Type Documentation

◆ llvm_lto_status

This provides a C-visible enumerator to manage status codes.

This should map exactly onto the C++ enumerator LTOStatus.

Enumerator
LLVM_LTO_UNKNOWN 
LLVM_LTO_OPT_SUCCESS 
LLVM_LTO_READ_SUCCESS 
LLVM_LTO_READ_FAILURE 
LLVM_LTO_WRITE_FAILURE 
LLVM_LTO_NO_TARGET 
LLVM_LTO_NO_WORK 
LLVM_LTO_MODULE_MERGE_FAILURE 
LLVM_LTO_ASM_FAILURE 
LLVM_LTO_NULL_OBJECT 

Definition at line 35 of file LinkTimeOptimizer.h.

Function Documentation

◆ llvm_create_optimizer()

llvm_lto_t llvm_create_optimizer ( void  )

This provides C interface to initialize link time optimizer.

This allows linker to use dlopen() interface to dynamically load LinkTimeOptimizer. extern "C" helps, because dlopen() interface uses name to find the symbol.

◆ llvm_destroy_optimizer()

void llvm_destroy_optimizer ( llvm_lto_t  lto)

◆ llvm_optimize_modules()

llvm_lto_status_t llvm_optimize_modules ( llvm_lto_t  lto,
const char output_filename 
)

◆ llvm_read_object_file()

llvm_lto_status_t llvm_read_object_file ( llvm_lto_t  lto,
const char input_filename 
)