public class LLVMLTO
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LLVMLTO.Functions
Contains the function pointers loaded from the LTO
SharedLibrary. |
| Modifier and Type | Field and Description |
|---|---|
static int |
LTOAPI_VERSION |
static int |
LTOCODEGEN_PIC_MODEL_DEFAULT
lto_codegen_model |
static int |
LTOCODEGEN_PIC_MODEL_DYNAMIC
lto_codegen_model |
static int |
LTOCODEGEN_PIC_MODEL_DYNAMIC_NO_PIC
lto_codegen_model |
static int |
LTOCODEGEN_PIC_MODEL_STATIC
lto_codegen_model |
static int |
LTODEBUG_MODEL_DWARF
lto_debug_model |
static int |
LTODEBUG_MODEL_NONE
lto_debug_model |
static int |
LTODS_ERROR
Diagnostic severity.
|
static int |
LTODS_NOTE
Diagnostic severity.
|
static int |
LTODS_REMARK
Diagnostic severity.
|
static int |
LTODS_WARNING
Diagnostic severity.
|
static int |
LTOSYMBOL_ALIAS
lto_symbol_attributes |
static int |
LTOSYMBOL_ALIGNMENT_MASK
lto_symbol_attributes |
static int |
LTOSYMBOL_COMDAT
lto_symbol_attributes |
static int |
LTOSYMBOL_DEFINITION_MASK
lto_symbol_attributes |
static int |
LTOSYMBOL_DEFINITION_REGULAR
lto_symbol_attributes |
static int |
LTOSYMBOL_DEFINITION_TENTATIVE
lto_symbol_attributes |
static int |
LTOSYMBOL_DEFINITION_UNDEFINED
lto_symbol_attributes |
static int |
LTOSYMBOL_DEFINITION_WEAK
lto_symbol_attributes |
static int |
LTOSYMBOL_DEFINITION_WEAKUNDEF
lto_symbol_attributes |
static int |
LTOSYMBOL_PERMISSIONS_CODE
lto_symbol_attributes |
static int |
LTOSYMBOL_PERMISSIONS_DATA
lto_symbol_attributes |
static int |
LTOSYMBOL_PERMISSIONS_MASK
lto_symbol_attributes |
static int |
LTOSYMBOL_PERMISSIONS_RODATA
lto_symbol_attributes |
static int |
LTOSYMBOL_SCOPE_DEFAULT
lto_symbol_attributes |
static int |
LTOSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN
lto_symbol_attributes |
static int |
LTOSYMBOL_SCOPE_HIDDEN
lto_symbol_attributes |
static int |
LTOSYMBOL_SCOPE_INTERNAL
lto_symbol_attributes |
static int |
LTOSYMBOL_SCOPE_MASK
lto_symbol_attributes |
static int |
LTOSYMBOL_SCOPE_PROTECTED
lto_symbol_attributes |
| Modifier and Type | Method and Description |
|---|---|
static org.lwjgl.system.SharedLibrary |
getLibrary()
Returns the LTO
SharedLibrary. |
static int |
lto_api_version()
Returns the runtime API version.
|
static boolean |
lto_codegen_add_module(long cg,
long mod)
Add an object module to the set of modules for which code will be generated.
|
static void |
lto_codegen_add_must_preserve_symbol(long cg,
java.nio.ByteBuffer symbol)
Adds to a list of all global symbols that must exist in the final generated code.
|
static void |
lto_codegen_add_must_preserve_symbol(long cg,
java.lang.CharSequence symbol)
Adds to a list of all global symbols that must exist in the final generated code.
|
static java.nio.ByteBuffer |
lto_codegen_compile_optimized(long cg)
Generates code for the optimized merged module into one native object file.
|
static boolean |
lto_codegen_compile_to_file(long cg,
org.lwjgl.PointerBuffer name)
Generates code for all added modules into one native object file.
|
static java.nio.ByteBuffer |
lto_codegen_compile(long cg)
Generates code for all added modules into one native object file.
|
static long |
lto_codegen_create_in_local_context()
Instantiate a code generator in its own context.
|
static long |
lto_codegen_create()
Instantiates a code generator.
|
static void |
lto_codegen_debug_options(long cg,
java.nio.ByteBuffer options)
Sets options to help debug codegen bugs.
|
static void |
lto_codegen_debug_options(long cg,
java.lang.CharSequence options)
Sets options to help debug codegen bugs.
|
static void |
lto_codegen_dispose(long cg)
Frees all code generator and all memory it internally allocated.
|
static boolean |
lto_codegen_optimize(long cg)
Runs optimization for the merged module.
|
static void |
lto_codegen_set_assembler_args(long cg,
org.lwjgl.PointerBuffer args)
Sets extra arguments that libLTO should pass to the assembler.
|
static void |
lto_codegen_set_assembler_path(long cg,
java.nio.ByteBuffer path)
Sets the location of the assembler tool to run.
|
static void |
lto_codegen_set_assembler_path(long cg,
java.lang.CharSequence path)
Sets the location of the assembler tool to run.
|
static void |
lto_codegen_set_cpu(long cg,
java.nio.ByteBuffer cpu)
Sets the cpu to generate code for.
|
static void |
lto_codegen_set_cpu(long cg,
java.lang.CharSequence cpu)
Sets the cpu to generate code for.
|
static boolean |
lto_codegen_set_debug_model(long cg,
int model)
Sets if debug info should be generated.
|
static void |
lto_codegen_set_diagnostic_handler(long cg,
LTODiagnosticHandlerI handler,
long ctxt)
Set a diagnostic handler and the related context (
void *). |
static void |
lto_codegen_set_module(long cg,
long mod)
Sets the object module for code generation.
|
static boolean |
lto_codegen_set_pic_model(long cg,
int model)
Sets which PIC code model to generated.
|
static void |
lto_codegen_set_should_embed_uselists(long cg,
boolean ShouldEmbedUselists)
Set whether to embed uselists in bitcode.
|
static void |
lto_codegen_set_should_internalize(long cg,
boolean ShouldInternalize)
Sets if we should run internalize pass during optimization and code generation.
|
static boolean |
lto_codegen_write_merged_modules(long cg,
java.nio.ByteBuffer path)
Writes a new object file at the specified path that contains the merged contents of all modules added so far.
|
static boolean |
lto_codegen_write_merged_modules(long cg,
java.lang.CharSequence path)
Writes a new object file at the specified path that contains the merged contents of all modules added so far.
|
static java.lang.String |
lto_get_error_message()
Returns the last error string or
NULL if last operation was successful. |
static java.lang.String |
lto_get_version()
Returns a printable string.
|
static void |
lto_initialize_disassembler()
Initializes LLVM disassemblers.
|
static long |
lto_module_create_from_fd_at_offset(int fd,
java.nio.ByteBuffer path,
long file_size,
long map_size,
long offset)
Loads an object file from disk.
|
static long |
lto_module_create_from_fd_at_offset(int fd,
java.lang.CharSequence path,
long file_size,
long map_size,
long offset)
Loads an object file from disk.
|
static long |
lto_module_create_from_fd(int fd,
java.nio.ByteBuffer path,
long file_size)
Loads an object file from disk.
|
static long |
lto_module_create_from_fd(int fd,
java.lang.CharSequence path,
long file_size)
Loads an object file from disk.
|
static long |
lto_module_create_from_memory_with_path(java.nio.ByteBuffer mem,
java.nio.ByteBuffer path)
Loads an object file from memory with an extra path argument.
|
static long |
lto_module_create_from_memory_with_path(java.nio.ByteBuffer mem,
java.lang.CharSequence path)
Loads an object file from memory with an extra path argument.
|
static long |
lto_module_create_from_memory(java.nio.ByteBuffer mem)
Loads an object file from memory.
|
static long |
lto_module_create_in_codegen_context(java.nio.ByteBuffer mem,
java.nio.ByteBuffer path,
long cg)
Loads an object file in the codegen context.
|
static long |
lto_module_create_in_codegen_context(java.nio.ByteBuffer mem,
java.lang.CharSequence path,
long cg)
Loads an object file in the codegen context.
|
static long |
lto_module_create_in_local_context(java.nio.ByteBuffer mem,
java.nio.ByteBuffer path)
Loads an object file in its own context.
|
static long |
lto_module_create_in_local_context(java.nio.ByteBuffer mem,
java.lang.CharSequence path)
Loads an object file in its own context.
|
static long |
lto_module_create(java.nio.ByteBuffer path)
Loads an object file from disk.
|
static long |
lto_module_create(java.lang.CharSequence path)
Loads an object file from disk.
|
static void |
lto_module_dispose(long mod)
Frees all memory internally allocated by the module.
|
static java.lang.String |
lto_module_get_linkeropts(long mod)
Returns the module's linker options.
|
static int |
lto_module_get_num_symbols(long mod)
Returns the number of symbols in the object module.
|
static int |
lto_module_get_symbol_attribute(long mod,
int index)
Returns the attributes of the ith symbol in the object module.
|
static java.lang.String |
lto_module_get_symbol_name(long mod,
int index)
Returns the name of the ith symbol in the object module.
|
static java.lang.String |
lto_module_get_target_triple(long mod)
Returns triple string which the object module was compiled under.
|
static boolean |
lto_module_has_objc_category(java.nio.ByteBuffer mem)
Return true if
Buffer contains a bitcode file with ObjC code (category or class) in it. |
static boolean |
lto_module_is_object_file_for_target(java.nio.ByteBuffer path,
java.nio.ByteBuffer target_triple_prefix)
Checks if a file is a loadable object compiled for requested target.
|
static boolean |
lto_module_is_object_file_for_target(java.lang.CharSequence path,
java.lang.CharSequence target_triple_prefix)
Checks if a file is a loadable object compiled for requested target.
|
static boolean |
lto_module_is_object_file_in_memory_for_target(java.nio.ByteBuffer mem,
java.nio.ByteBuffer target_triple_prefix)
Checks if a buffer is a loadable object compiled for requested target.
|
static boolean |
lto_module_is_object_file_in_memory_for_target(java.nio.ByteBuffer mem,
java.lang.CharSequence target_triple_prefix)
Checks if a buffer is a loadable object compiled for requested target.
|
static boolean |
lto_module_is_object_file_in_memory(java.nio.ByteBuffer mem)
Checks if a buffer is a loadable object file.
|
static boolean |
lto_module_is_object_file(java.nio.ByteBuffer path)
Checks if a file is a loadable object file.
|
static boolean |
lto_module_is_object_file(java.lang.CharSequence path)
Checks if a file is a loadable object file.
|
static boolean |
lto_module_is_thinlto(long mod)
Test if a module has support for ThinLTO linking.
|
static void |
lto_module_set_target_triple(long mod,
java.nio.ByteBuffer triple)
Sets triple string with which the object will be codegened.
|
static void |
lto_module_set_target_triple(long mod,
java.lang.CharSequence triple)
Sets triple string with which the object will be codegened.
|
static void |
nlto_codegen_add_must_preserve_symbol(long cg,
long symbol)
Unsafe version of:
codegen_add_must_preserve_symbol |
static long |
nlto_codegen_compile_optimized(long cg,
long length)
Unsafe version of:
codegen_compile_optimized |
static boolean |
nlto_codegen_compile_to_file(long cg,
long name)
Unsafe version of:
codegen_compile_to_file |
static long |
nlto_codegen_compile(long cg,
long length)
Unsafe version of:
codegen_compile |
static void |
nlto_codegen_debug_options(long cg,
long options)
Unsafe version of:
codegen_debug_options |
static void |
nlto_codegen_set_assembler_args(long cg,
long args,
int nargs)
Unsafe version of:
codegen_set_assembler_args |
static void |
nlto_codegen_set_assembler_path(long cg,
long path)
Unsafe version of:
codegen_set_assembler_path |
static void |
nlto_codegen_set_cpu(long cg,
long cpu)
Unsafe version of:
codegen_set_cpu |
static void |
nlto_codegen_set_diagnostic_handler(long cg,
long handler,
long ctxt)
Unsafe version of:
codegen_set_diagnostic_handler |
static boolean |
nlto_codegen_write_merged_modules(long cg,
long path)
Unsafe version of:
codegen_write_merged_modules |
static long |
nlto_get_error_message()
Unsafe version of:
get_error_message |
static long |
nlto_get_version()
Unsafe version of:
get_version |
static long |
nlto_module_create_from_fd_at_offset(int fd,
long path,
long file_size,
long map_size,
long offset)
Unsafe version of:
module_create_from_fd_at_offset |
static long |
nlto_module_create_from_fd(int fd,
long path,
long file_size)
Unsafe version of:
module_create_from_fd |
static long |
nlto_module_create_from_memory_with_path(long mem,
long length,
long path)
Unsafe version of:
module_create_from_memory_with_path |
static long |
nlto_module_create_from_memory(long mem,
long length)
Unsafe version of:
module_create_from_memory |
static long |
nlto_module_create_in_codegen_context(long mem,
long length,
long path,
long cg)
Unsafe version of:
module_create_in_codegen_context |
static long |
nlto_module_create_in_local_context(long mem,
long length,
long path)
Unsafe version of:
module_create_in_local_context |
static long |
nlto_module_create(long path)
Unsafe version of:
module_create |
static long |
nlto_module_get_linkeropts(long mod)
Unsafe version of:
module_get_linkeropts |
static long |
nlto_module_get_symbol_name(long mod,
int index)
Unsafe version of:
module_get_symbol_name |
static long |
nlto_module_get_target_triple(long mod)
Unsafe version of:
module_get_target_triple |
static boolean |
nlto_module_has_objc_category(long mem,
long length)
Unsafe version of:
module_has_objc_category |
static boolean |
nlto_module_is_object_file_for_target(long path,
long target_triple_prefix)
Unsafe version of:
module_is_object_file_for_target |
static boolean |
nlto_module_is_object_file_in_memory_for_target(long mem,
long length,
long target_triple_prefix)
Unsafe version of:
module_is_object_file_in_memory_for_target |
static boolean |
nlto_module_is_object_file_in_memory(long mem,
long length)
Unsafe version of:
module_is_object_file_in_memory |
static boolean |
nlto_module_is_object_file(long path)
Unsafe version of:
module_is_object_file |
static void |
nlto_module_set_target_triple(long mod,
long triple)
Unsafe version of:
module_set_target_triple |
static void |
nthinlto_codegen_add_cross_referenced_symbol(long cg,
long name,
int length)
Unsafe version of:
thinlto_codegen_add_cross_referenced_symbol(long, java.nio.ByteBuffer) |
static void |
nthinlto_codegen_add_module(long cg,
long identifier,
long data,
int length)
Unsafe version of:
thinlto_codegen_add_module(long, java.nio.ByteBuffer, java.nio.ByteBuffer) |
static void |
nthinlto_codegen_add_must_preserve_symbol(long cg,
long name,
int length)
Unsafe version of:
thinlto_codegen_add_must_preserve_symbol(long, java.nio.ByteBuffer) |
static void |
nthinlto_codegen_set_cache_dir(long cg,
long cache_dir)
Unsafe version of:
thinlto_codegen_set_cache_dir(long, java.nio.ByteBuffer) |
static void |
nthinlto_codegen_set_cpu(long cg,
long cpu)
Unsafe version of:
thinlto_codegen_set_cpu(long, java.nio.ByteBuffer) |
static void |
nthinlto_codegen_set_savetemps_dir(long cg,
long save_temps_dir)
Unsafe version of:
thinlto_codegen_set_savetemps_dir(long, java.nio.ByteBuffer) |
static void |
nthinlto_debug_options(long options,
int number)
Unsafe version of:
thinlto_debug_options(org.lwjgl.PointerBuffer) |
static long |
nthinlto_module_get_object_file(long cg,
int index)
Unsafe version of:
thinlto_module_get_object_file(long, int) |
static void |
nthinlto_module_get_object(long cg,
int index,
long __result)
Unsafe version of:
thinlto_module_get_object(long, int, org.lwjgl.llvm.LTOObjectBuffer) |
static void |
nthinlto_module_get_object(long cg,
int index,
long __functionAddress,
long __result)
Unsafe version of:
thinlto_module_get_object(long, int, org.lwjgl.llvm.LTOObjectBuffer) |
static void |
nthinlto_set_generated_objects_dir(long cg,
long save_temps_dir)
Unsafe version of:
thinlto_set_generated_objects_dir(long, java.nio.ByteBuffer) |
static void |
thinlto_codegen_add_cross_referenced_symbol(long cg,
java.nio.ByteBuffer name)
Adds a symbol to the list of global symbols that are cross-referenced between ThinLTO files.
|
static void |
thinlto_codegen_add_cross_referenced_symbol(long cg,
java.lang.CharSequence name)
Adds a symbol to the list of global symbols that are cross-referenced between ThinLTO files.
|
static void |
thinlto_codegen_add_module(long cg,
java.nio.ByteBuffer identifier,
java.nio.ByteBuffer data)
Add a module to a ThinLTO code generator.
|
static void |
thinlto_codegen_add_module(long cg,
java.lang.CharSequence identifier,
java.nio.ByteBuffer data)
Add a module to a ThinLTO code generator.
|
static void |
thinlto_codegen_add_must_preserve_symbol(long cg,
java.nio.ByteBuffer name)
Adds a symbol to the list of global symbols that must exist in the final generated code.
|
static void |
thinlto_codegen_add_must_preserve_symbol(long cg,
java.lang.CharSequence name)
Adds a symbol to the list of global symbols that must exist in the final generated code.
|
static void |
thinlto_codegen_disable_codegen(long cg,
boolean disable)
Disable CodeGen, only run the stages till codegen and stop.
|
static void |
thinlto_codegen_dispose(long cg)
Frees the generator and all memory it internally allocated.
|
static void |
thinlto_codegen_process(long cg)
Optimize and codegen all the modules added to the codegenerator using ThinLTO.
|
static void |
thinlto_codegen_set_cache_dir(long cg,
java.nio.ByteBuffer cache_dir)
Sets the path to a directory to use as a cache storage for incremental build.
|
static void |
thinlto_codegen_set_cache_dir(long cg,
java.lang.CharSequence cache_dir)
Sets the path to a directory to use as a cache storage for incremental build.
|
static void |
thinlto_codegen_set_cache_entry_expiration(long cg,
int expiration)
Sets the expiration (in seconds) for an entry in the cache.
|
static void |
thinlto_codegen_set_cache_pruning_interval(long cg,
int interval)
Sets the cache pruning interval (in seconds).
|
static void |
thinlto_codegen_set_cache_size_bytes(long cg,
int max_size_bytes)
Sets the maximum size of the cache directory (in bytes).
|
static void |
thinlto_codegen_set_cache_size_files(long cg,
int max_size_files)
Sets the maximum number of files in the cache directory.
|
static void |
thinlto_codegen_set_cache_size_megabytes(long cg,
int max_size_megabytes)
Same as
thinlto_codegen_set_cache_size_bytes(long, int), except the maximum size is in megabytes (220 bytes). |
static void |
thinlto_codegen_set_codegen_only(long cg,
boolean codegen_only)
Perform CodeGen only: disable all other stages.
|
static void |
thinlto_codegen_set_cpu(long cg,
java.nio.ByteBuffer cpu)
Sets the cpu to generate code for.
|
static void |
thinlto_codegen_set_cpu(long cg,
java.lang.CharSequence cpu)
Sets the cpu to generate code for.
|
static void |
thinlto_codegen_set_final_cache_size_relative_to_available_space(long cg,
int percentage)
Sets the maximum cache size that can be persistent across build, in terms of percentage of the available space on the disk.
|
static boolean |
thinlto_codegen_set_pic_model(long cg,
int model)
Sets which PIC code model to generate.
|
static void |
thinlto_codegen_set_savetemps_dir(long cg,
java.nio.ByteBuffer save_temps_dir)
Sets the path to a directory to use as a storage for temporary bitcode files.
|
static void |
thinlto_codegen_set_savetemps_dir(long cg,
java.lang.CharSequence save_temps_dir)
Sets the path to a directory to use as a storage for temporary bitcode files.
|
static long |
thinlto_create_codegen()
Instantiates a ThinLTO code generator.
|
static void |
thinlto_debug_options(org.lwjgl.PointerBuffer options)
Parse
-mllvm style debug options. |
static int |
thinlto_module_get_num_object_files(long cg)
Returns the number of object files produced by the ThinLTO CodeGenerator.
|
static int |
thinlto_module_get_num_objects(long cg)
Returns the number of object files produced by the ThinLTO CodeGenerator.
|
static java.lang.String |
thinlto_module_get_object_file(long cg,
int index)
Returns the path to the ith object file produced by the ThinLTO CodeGenerator.
|
static LTOObjectBuffer |
thinlto_module_get_object(long cg,
int index,
LTOObjectBuffer __result)
Returns a reference to the ith object file produced by the ThinLTO CodeGenerator.
|
static void |
thinlto_set_generated_objects_dir(long cg,
java.nio.ByteBuffer save_temps_dir)
Set the path to a directory where to save generated object files.
|
static void |
thinlto_set_generated_objects_dir(long cg,
java.lang.CharSequence save_temps_dir)
Set the path to a directory where to save generated object files.
|
public static final int LTOAPI_VERSION
public static final int LTOSYMBOL_ALIGNMENT_MASK
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_PERMISSIONS_MASK
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_PERMISSIONS_CODE
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_PERMISSIONS_DATA
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_PERMISSIONS_RODATA
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_DEFINITION_MASK
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_DEFINITION_REGULAR
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_DEFINITION_TENTATIVE
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_DEFINITION_WEAK
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_DEFINITION_UNDEFINED
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_DEFINITION_WEAKUNDEF
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_SCOPE_MASK
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_SCOPE_INTERNAL
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_SCOPE_HIDDEN
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_SCOPE_PROTECTED
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_SCOPE_DEFAULT
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_COMDAT
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTOSYMBOL_ALIAS
lto_symbol_attributes
SYMBOL_ALIGNMENT_MASK - log2 of alignmentSYMBOL_PERMISSIONS_MASKSYMBOL_PERMISSIONS_CODESYMBOL_PERMISSIONS_DATASYMBOL_PERMISSIONS_RODATASYMBOL_DEFINITION_MASKSYMBOL_DEFINITION_REGULARSYMBOL_DEFINITION_TENTATIVESYMBOL_DEFINITION_WEAKSYMBOL_DEFINITION_UNDEFINEDSYMBOL_DEFINITION_WEAKUNDEFSYMBOL_SCOPE_MASKSYMBOL_SCOPE_INTERNALSYMBOL_SCOPE_HIDDENSYMBOL_SCOPE_PROTECTEDSYMBOL_SCOPE_DEFAULTSYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDENSYMBOL_COMDATSYMBOL_ALIASpublic static final int LTODEBUG_MODEL_NONE
public static final int LTODEBUG_MODEL_DWARF
public static final int LTOCODEGEN_PIC_MODEL_STATIC
lto_codegen_model
public static final int LTOCODEGEN_PIC_MODEL_DYNAMIC
lto_codegen_model
public static final int LTOCODEGEN_PIC_MODEL_DYNAMIC_NO_PIC
lto_codegen_model
public static final int LTOCODEGEN_PIC_MODEL_DEFAULT
lto_codegen_model
public static final int LTODS_ERROR
(lto_codegen_diagnostic_severity_t)
DS_ERRORDS_WARNINGDS_REMARK - Added in LTO_API_VERSION=10.DS_NOTEpublic static final int LTODS_WARNING
(lto_codegen_diagnostic_severity_t)
DS_ERRORDS_WARNINGDS_REMARK - Added in LTO_API_VERSION=10.DS_NOTEpublic static final int LTODS_REMARK
(lto_codegen_diagnostic_severity_t)
DS_ERRORDS_WARNINGDS_REMARK - Added in LTO_API_VERSION=10.DS_NOTEpublic static final int LTODS_NOTE
(lto_codegen_diagnostic_severity_t)
DS_ERRORDS_WARNINGDS_REMARK - Added in LTO_API_VERSION=10.DS_NOTEpublic static org.lwjgl.system.SharedLibrary getLibrary()
SharedLibrary.public static long nlto_get_version()
get_versionpublic static java.lang.String lto_get_version()
public static long nlto_get_error_message()
get_error_message@Nullable public static java.lang.String lto_get_error_message()
NULL if last operation was successful.public static boolean nlto_module_is_object_file(long path)
module_is_object_filepublic static boolean lto_module_is_object_file(java.nio.ByteBuffer path)
public static boolean lto_module_is_object_file(java.lang.CharSequence path)
public static boolean nlto_module_is_object_file_for_target(long path,
long target_triple_prefix)
module_is_object_file_for_targetpublic static boolean lto_module_is_object_file_for_target(java.nio.ByteBuffer path,
java.nio.ByteBuffer target_triple_prefix)
public static boolean lto_module_is_object_file_for_target(java.lang.CharSequence path,
java.lang.CharSequence target_triple_prefix)
public static boolean nlto_module_has_objc_category(long mem,
long length)
module_has_objc_categorypublic static boolean lto_module_has_objc_category(java.nio.ByteBuffer mem)
Buffer contains a bitcode file with ObjC code (category or class) in it.public static boolean nlto_module_is_object_file_in_memory(long mem,
long length)
module_is_object_file_in_memorypublic static boolean lto_module_is_object_file_in_memory(java.nio.ByteBuffer mem)
public static boolean nlto_module_is_object_file_in_memory_for_target(long mem,
long length,
long target_triple_prefix)
module_is_object_file_in_memory_for_targetpublic static boolean lto_module_is_object_file_in_memory_for_target(java.nio.ByteBuffer mem,
java.nio.ByteBuffer target_triple_prefix)
public static boolean lto_module_is_object_file_in_memory_for_target(java.nio.ByteBuffer mem,
java.lang.CharSequence target_triple_prefix)
public static long nlto_module_create(long path)
module_createpublic static long lto_module_create(java.nio.ByteBuffer path)
NULL on error (check get_error_message for details).public static long lto_module_create(java.lang.CharSequence path)
NULL on error (check get_error_message for details).public static long nlto_module_create_from_memory(long mem,
long length)
module_create_from_memorypublic static long lto_module_create_from_memory(java.nio.ByteBuffer mem)
NULL on error (check get_error_message for details).public static long nlto_module_create_from_memory_with_path(long mem,
long length,
long path)
module_create_from_memory_with_pathpublic static long lto_module_create_from_memory_with_path(java.nio.ByteBuffer mem,
java.nio.ByteBuffer path)
NULL on error (check get_error_message for details).public static long lto_module_create_from_memory_with_path(java.nio.ByteBuffer mem,
java.lang.CharSequence path)
NULL on error (check get_error_message for details).public static long nlto_module_create_in_local_context(long mem,
long length,
long path)
module_create_in_local_contextpublic static long lto_module_create_in_local_context(java.nio.ByteBuffer mem,
java.nio.ByteBuffer path)
Loads an object file in its own LLVMContext. This function call is thread-safe. However, modules created this way should not be merged into an
lto_code_gen_t using codegen_add_module.
Returns NULL on error (check get_error_message for details).
public static long lto_module_create_in_local_context(java.nio.ByteBuffer mem,
java.lang.CharSequence path)
Loads an object file in its own LLVMContext. This function call is thread-safe. However, modules created this way should not be merged into an
lto_code_gen_t using codegen_add_module.
Returns NULL on error (check get_error_message for details).
public static long nlto_module_create_in_codegen_context(long mem,
long length,
long path,
long cg)
module_create_in_codegen_contextpublic static long lto_module_create_in_codegen_context(java.nio.ByteBuffer mem,
java.nio.ByteBuffer path,
long cg)
Loads an object file into the same context as cg. The module is safe to add using codegen_add_module.
Returns NULL on error (check get_error_message for details).
public static long lto_module_create_in_codegen_context(java.nio.ByteBuffer mem,
java.lang.CharSequence path,
long cg)
Loads an object file into the same context as cg. The module is safe to add using codegen_add_module.
Returns NULL on error (check get_error_message for details).
public static long nlto_module_create_from_fd(int fd,
long path,
long file_size)
module_create_from_fdpublic static long lto_module_create_from_fd(int fd,
java.nio.ByteBuffer path,
long file_size)
fd is not preserved. Returns NULL on error (check get_error_message for details).public static long lto_module_create_from_fd(int fd,
java.lang.CharSequence path,
long file_size)
fd is not preserved. Returns NULL on error (check get_error_message for details).public static long nlto_module_create_from_fd_at_offset(int fd,
long path,
long file_size,
long map_size,
long offset)
module_create_from_fd_at_offsetpublic static long lto_module_create_from_fd_at_offset(int fd,
java.nio.ByteBuffer path,
long file_size,
long map_size,
long offset)
fd is not preserved. Returns NULL on error (check get_error_message for details).public static long lto_module_create_from_fd_at_offset(int fd,
java.lang.CharSequence path,
long file_size,
long map_size,
long offset)
fd is not preserved. Returns NULL on error (check get_error_message for details).public static void lto_module_dispose(long mod)
lto_module_t is no longer valid.public static long nlto_module_get_target_triple(long mod)
module_get_target_triple@Nullable public static java.lang.String lto_module_get_target_triple(long mod)
public static void nlto_module_set_target_triple(long mod,
long triple)
module_set_target_triplepublic static void lto_module_set_target_triple(long mod,
java.nio.ByteBuffer triple)
public static void lto_module_set_target_triple(long mod,
java.lang.CharSequence triple)
public static int lto_module_get_num_symbols(long mod)
public static long nlto_module_get_symbol_name(long mod,
int index)
module_get_symbol_name@Nullable
public static java.lang.String lto_module_get_symbol_name(long mod,
int index)
public static int lto_module_get_symbol_attribute(long mod,
int index)
public static long nlto_module_get_linkeropts(long mod)
module_get_linkeropts@Nullable public static java.lang.String lto_module_get_linkeropts(long mod)
The linker options may consist of multiple flags. It is the linker's responsibility to split the flags using a platform-specific mechanism.
public static void nlto_codegen_set_diagnostic_handler(long cg,
long handler,
long ctxt)
codegen_set_diagnostic_handlerpublic static void lto_codegen_set_diagnostic_handler(long cg,
LTODiagnosticHandlerI handler,
long ctxt)
void *). This is more general than get_error_message, as the diagnostic handler can be
called at anytime within lto.public static long lto_codegen_create()
NULL on error (check get_error_message for details).
All modules added using codegen_add_module must have been created in the same context as the codegen.
public static long lto_codegen_create_in_local_context()
Instantiates a code generator in its own context. Modules added via codegen_add_module must have all been created in the same context, using
module_create_in_codegen_context.
public static void lto_codegen_dispose(long cg)
lto_code_gen_t is no longer valid.public static boolean lto_codegen_add_module(long cg,
long mod)
get_error_message for details).
cg and mod must both be in the same context. See codegen_create_in_local_context and module_create_in_codegen_context.
public static void lto_codegen_set_module(long cg,
long mod)
cg and mod must both be in the same context.
public static boolean lto_codegen_set_debug_model(long cg,
int model)
get_error_message for details).public static boolean lto_codegen_set_pic_model(long cg,
int model)
get_error_message for details).public static void nlto_codegen_set_cpu(long cg,
long cpu)
codegen_set_cpupublic static void lto_codegen_set_cpu(long cg,
java.nio.ByteBuffer cpu)
public static void lto_codegen_set_cpu(long cg,
java.lang.CharSequence cpu)
public static void nlto_codegen_set_assembler_path(long cg,
long path)
codegen_set_assembler_pathpublic static void lto_codegen_set_assembler_path(long cg,
java.nio.ByteBuffer path)
public static void lto_codegen_set_assembler_path(long cg,
java.lang.CharSequence path)
public static void nlto_codegen_set_assembler_args(long cg,
long args,
int nargs)
codegen_set_assembler_argspublic static void lto_codegen_set_assembler_args(long cg,
org.lwjgl.PointerBuffer args)
public static void nlto_codegen_add_must_preserve_symbol(long cg,
long symbol)
codegen_add_must_preserve_symbolpublic static void lto_codegen_add_must_preserve_symbol(long cg,
java.nio.ByteBuffer symbol)
public static void lto_codegen_add_must_preserve_symbol(long cg,
java.lang.CharSequence symbol)
public static boolean nlto_codegen_write_merged_modules(long cg,
long path)
codegen_write_merged_modulespublic static boolean lto_codegen_write_merged_modules(long cg,
java.nio.ByteBuffer path)
get_error_message for details).public static boolean lto_codegen_write_merged_modules(long cg,
java.lang.CharSequence path)
get_error_message for details).public static long nlto_codegen_compile(long cg,
long length)
codegen_compile@Nullable public static java.nio.ByteBuffer lto_codegen_compile(long cg)
codegen_optimize then codegen_compile_optimized.
On success returns a pointer to a generated mach-o/ELF buffer and length set to the buffer size. The buffer is owned by the lto_code_gen_t and
will be freed when codegen_dispose is called, or lto_codegen_compile() is called again. On failure, returns NULL (check
get_error_message for details).
public static boolean nlto_codegen_compile_to_file(long cg,
long name)
codegen_compile_to_filepublic static boolean lto_codegen_compile_to_file(long cg,
org.lwjgl.PointerBuffer name)
codegen_optimize then codegen_compile_optimized (instead of
returning a generated mach-o/ELF buffer, it writes to a file).
The name of the file is written to name. Returns true on error.
public static boolean lto_codegen_optimize(long cg)
public static long nlto_codegen_compile_optimized(long cg,
long length)
codegen_compile_optimized@Nullable public static java.nio.ByteBuffer lto_codegen_compile_optimized(long cg)
On success returns a pointer to a generated mach-o/ELF buffer and length set to the buffer size. The buffer is owned by the lto_code_gen_t and
will be freed when codegen_dispose is called, or lto_codegen_compile_optimized() is called again. On failure, returns NULL (check
get_error_message for details).
public static int lto_api_version()
public static void nlto_codegen_debug_options(long cg,
long options)
codegen_debug_optionspublic static void lto_codegen_debug_options(long cg,
java.nio.ByteBuffer options)
public static void lto_codegen_debug_options(long cg,
java.lang.CharSequence options)
public static void lto_initialize_disassembler()
public static void lto_codegen_set_should_internalize(long cg,
boolean ShouldInternalize)
public static void lto_codegen_set_should_embed_uselists(long cg,
boolean ShouldEmbedUselists)
Sets whether codegen_write_merged_modules should embed uselists in output bitcode. This should be turned on for all -save-temps output.
public static long thinlto_create_codegen()
NULL on error (check lto_get_error_message() for details).
The ThinLTOCodeGenerator is not intended to be reuse 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.
public static void thinlto_codegen_dispose(long cg)
thinlto_code_gen_t is no longer valid.public static void nthinlto_codegen_add_module(long cg,
long identifier,
long data,
int length)
thinlto_codegen_add_module(long, java.nio.ByteBuffer, java.nio.ByteBuffer)public static void thinlto_codegen_add_module(long cg,
java.nio.ByteBuffer identifier,
java.nio.ByteBuffer data)
thinlto_code_gen_t it is added to.
On failure, returns NULL (check get_error_message for details).
public static void thinlto_codegen_add_module(long cg,
java.lang.CharSequence identifier,
java.nio.ByteBuffer data)
thinlto_code_gen_t it is added to.
On failure, returns NULL (check get_error_message for details).
public static void thinlto_codegen_process(long cg)
thinlto_module_get_object(long, int, org.lwjgl.llvm.LTOObjectBuffer).public static int thinlto_module_get_num_objects(long cg)
It usually matches the number of input files, but this is not a guarantee of the API and may change in future implementation, so the client should not assume it.
public static void nthinlto_module_get_object(long cg,
int index,
long __functionAddress,
long __result)
thinlto_module_get_object(long, int, org.lwjgl.llvm.LTOObjectBuffer)public static void nthinlto_module_get_object(long cg,
int index,
long __result)
thinlto_module_get_object(long, int, org.lwjgl.llvm.LTOObjectBuffer)public static LTOObjectBuffer thinlto_module_get_object(long cg, int index, LTOObjectBuffer __result)
Client should use thinlto_module_get_num_objects(long) to get the number of available objects.
public static int thinlto_module_get_num_object_files(long cg)
It usually matches the number of input files, but this is not a guarantee of the API and may change in future implementation, so the client should not assume it.
public static long nthinlto_module_get_object_file(long cg,
int index)
thinlto_module_get_object_file(long, int)@Nullable
public static java.lang.String thinlto_module_get_object_file(long cg,
int index)
Client should use thinlto_module_get_num_object_files(long) to get the number of available objects.
public static boolean thinlto_codegen_set_pic_model(long cg,
int model)
get_error_message for details).public static void nthinlto_codegen_set_savetemps_dir(long cg,
long save_temps_dir)
thinlto_codegen_set_savetemps_dir(long, java.nio.ByteBuffer)public static void thinlto_codegen_set_savetemps_dir(long cg,
java.nio.ByteBuffer save_temps_dir)
public static void thinlto_codegen_set_savetemps_dir(long cg,
java.lang.CharSequence save_temps_dir)
public static void nthinlto_set_generated_objects_dir(long cg,
long save_temps_dir)
thinlto_set_generated_objects_dir(long, java.nio.ByteBuffer)public static void thinlto_set_generated_objects_dir(long cg,
java.nio.ByteBuffer save_temps_dir)
thinlto_module_get_object_file(long, int) instead of thinlto_module_get_object(long, int, org.lwjgl.llvm.LTOObjectBuffer).public static void thinlto_set_generated_objects_dir(long cg,
java.lang.CharSequence save_temps_dir)
thinlto_module_get_object_file(long, int) instead of thinlto_module_get_object(long, int, org.lwjgl.llvm.LTOObjectBuffer).public static void nthinlto_codegen_set_cpu(long cg,
long cpu)
thinlto_codegen_set_cpu(long, java.nio.ByteBuffer)public static void thinlto_codegen_set_cpu(long cg,
java.nio.ByteBuffer cpu)
public static void thinlto_codegen_set_cpu(long cg,
java.lang.CharSequence cpu)
public static void thinlto_codegen_disable_codegen(long cg,
boolean disable)
public static void thinlto_codegen_set_codegen_only(long cg,
boolean codegen_only)
public static void nthinlto_debug_options(long options,
int number)
thinlto_debug_options(org.lwjgl.PointerBuffer)public static void thinlto_debug_options(org.lwjgl.PointerBuffer options)
-mllvm style debug options.public static boolean lto_module_is_thinlto(long mod)
public static void nthinlto_codegen_add_must_preserve_symbol(long cg,
long name,
int length)
thinlto_codegen_add_must_preserve_symbol(long, java.nio.ByteBuffer)public static void thinlto_codegen_add_must_preserve_symbol(long cg,
java.nio.ByteBuffer name)
public static void thinlto_codegen_add_must_preserve_symbol(long cg,
java.lang.CharSequence name)
public static void nthinlto_codegen_add_cross_referenced_symbol(long cg,
long name,
int length)
thinlto_codegen_add_cross_referenced_symbol(long, java.nio.ByteBuffer)public static void thinlto_codegen_add_cross_referenced_symbol(long cg,
java.nio.ByteBuffer name)
public static void thinlto_codegen_add_cross_referenced_symbol(long cg,
java.lang.CharSequence name)
public static void nthinlto_codegen_set_cache_dir(long cg,
long cache_dir)
thinlto_codegen_set_cache_dir(long, java.nio.ByteBuffer)public static void thinlto_codegen_set_cache_dir(long cg,
java.nio.ByteBuffer cache_dir)
public static void thinlto_codegen_set_cache_dir(long cg,
java.lang.CharSequence cache_dir)
public static void thinlto_codegen_set_cache_pruning_interval(long cg,
int interval)
public static void thinlto_codegen_set_final_cache_size_relative_to_available_space(long cg,
int percentage)
The formula looks like: AvailableSpace = FreeSpace + ExistingCacheSize NewCacheSize = AvailableSpace * P/100
public static void thinlto_codegen_set_cache_entry_expiration(long cg,
int expiration)
public static void thinlto_codegen_set_cache_size_bytes(long cg,
int max_size_bytes)
public static void thinlto_codegen_set_cache_size_megabytes(long cg,
int max_size_megabytes)
thinlto_codegen_set_cache_size_bytes(long, int), except the maximum size is in megabytes (220 bytes).public static void thinlto_codegen_set_cache_size_files(long cg,
int max_size_files)
Copyright LWJGL. All Rights Reserved. License terms.