From a37221450355305af8aaa4309d70e94cf232dcc6 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Mon, 2 Dec 2024 13:49:39 +0000 Subject: [PATCH] build based on a1c3b21 --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- dev/lib/analyses/index.html | 4 +- dev/lib/blocks/index.html | 2 +- dev/lib/codegen/index.html | 6 +- dev/lib/essentials/index.html | 20 +-- dev/lib/execution/index.html | 2 +- dev/lib/functions/index.html | 2 +- dev/lib/hidden/index.html | 262 ++++++++++++++++---------------- dev/lib/instructions/index.html | 4 +- dev/lib/interop/index.html | 6 +- dev/lib/metadata/index.html | 4 +- dev/lib/modules/index.html | 2 +- dev/lib/transforms/index.html | 10 +- dev/lib/types/index.html | 2 +- dev/lib/values/index.html | 2 +- dev/man/analyses/index.html | 2 +- dev/man/blocks/index.html | 2 +- dev/man/codegen/index.html | 2 +- dev/man/essentials/index.html | 2 +- dev/man/execution/index.html | 2 +- dev/man/functions/index.html | 2 +- dev/man/instructions/index.html | 2 +- dev/man/interop/index.html | 2 +- dev/man/metadata/index.html | 2 +- dev/man/modules/index.html | 2 +- dev/man/transforms/index.html | 2 +- dev/man/types/index.html | 2 +- dev/man/values/index.html | 2 +- 29 files changed, 179 insertions(+), 179 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 54f9fba5..dea07418 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-10-22T16:57:28","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-12-02T13:49:35","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index ecf6fb48..eaa0857c 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · LLVM.jl

LLVM.jl

A Julia wrapper for LLVM.

This package provides a wrapper for the LLVM compiler framework, based on the LLVM C API. You can use LLVM.jl to work with LLVM code generated by Julia, to interoperate with the Julia compiler, or to create your own compiler. It is heavily used by the different GPU compilers for the Julia programming language.

There are different levels of abstraction and functionality available in this package:

  • functionality in the top-level LLVM module: high-level wrappers for the LLVM C API, and additional functionality to make working with LLVM easier;
  • functionality in LLVM.Interop: specific functionality to interoperate with the Julia compiler, and to work with LLVM code generated by Julia;
  • functionality in the LLVM.API submodule: a direct mapping of the LLVM C API to Julia. This is useful when you need to work with the LLVM C API directly, or when you need functionality that is not yet wrapped in the top-level module.

For installation instructions, please refer to the README.

+Home · LLVM.jl

LLVM.jl

A Julia wrapper for LLVM.

This package provides a wrapper for the LLVM compiler framework, based on the LLVM C API. You can use LLVM.jl to work with LLVM code generated by Julia, to interoperate with the Julia compiler, or to create your own compiler. It is heavily used by the different GPU compilers for the Julia programming language.

There are different levels of abstraction and functionality available in this package:

  • functionality in the top-level LLVM module: high-level wrappers for the LLVM C API, and additional functionality to make working with LLVM easier;
  • functionality in LLVM.Interop: specific functionality to interoperate with the Julia compiler, and to work with LLVM code generated by Julia;
  • functionality in the LLVM.API submodule: a direct mapping of the LLVM C API to Julia. This is useful when you need to work with the LLVM C API directly, or when you need functionality that is not yet wrapped in the top-level module.

For installation instructions, please refer to the README.

diff --git a/dev/lib/analyses/index.html b/dev/lib/analyses/index.html index 0d4b24e0..a7a31489 100644 --- a/dev/lib/analyses/index.html +++ b/dev/lib/analyses/index.html @@ -1,4 +1,4 @@ Analyses · LLVM.jl

Analyses

IR verification

LLVM.verifyFunction
verify(mod::Module)
-verify(f::Function)

Verify the module or function mod or f. If verification fails, an exception is thrown.

source

Dominator and post-dominator

LLVM.dominatesFunction
dominates(tree::DomTree, A::Instruction, B::Instruction)
-dominates(tree::PostDomTree, A::Instruction, B::Instruction)

Check if instruction A dominates instruction B in the dominator tree tree.

source
+verify(f::Function)

Verify the module or function mod or f. If verification fails, an exception is thrown.

source

Dominator and post-dominator

LLVM.DomTreeType
DomTree

Dominator tree for a function.

source
LLVM.disposeMethod
dispose(::DomTree)

Dispose of a dominator tree.

source
LLVM.PostDomTreeType
PostDomTree

Post-dominator tree for a function.

source
LLVM.disposeMethod
dispose(tree::PostDomTree)

Dispose of a post-dominator tree.

source
LLVM.dominatesFunction
dominates(tree::DomTree, A::Instruction, B::Instruction)
+dominates(tree::PostDomTree, A::Instruction, B::Instruction)

Check if instruction A dominates instruction B in the dominator tree tree.

source
diff --git a/dev/lib/blocks/index.html b/dev/lib/blocks/index.html index 5a4a4ad5..3e60fbca 100644 --- a/dev/lib/blocks/index.html +++ b/dev/lib/blocks/index.html @@ -1,2 +1,2 @@ -Basic blocks · LLVM.jl

Basic blocks

LLVM.BasicBlockType
BasicBlock

A basic block in the IR. A basic block is a sequence of instructions that always ends in a terminator instruction.

source
LLVM.BasicBlockMethod
BasicBlock(name::String)

Create a new, empty basic block with the given name.

source
LLVM.BasicBlockMethod
BasicBlock(f::LLVM.Function, name::String)

Create a new, empty basic block with the given name, and insert it at the end of the given function.

source
LLVM.BasicBlockMethod
BasicBlock(bb::BasicBlock, name::String)

Create a new, empty basic block with the given name, and insert it before the given basic block.

source

Properties and operations

LLVM.remove!Method
remove!(bb::BasicBlock)

Remove the given basic block from its parent function, but do not free the object.

source
LLVM.erase!Method
erase!(fun::Function, bb::BasicBlock)

Remove the given basic block from its parent function and free the object.

Warning

This function is unsafe because it does not check if the basic block is used elsewhere.

source
LLVM.parentMethod
parent(bb::BasicBlock) -> LLVM.Function

Get the function that contains the given basic block, or nothing if the block is not part of a function.

source
LLVM.terminatorMethod
terminator(bb::BasicBlock) -> LLVM.Instruction

Get the terminator instruction of the given basic block.

source
LLVM.nameMethod
name(bb::BasicBlock) -> String

Get the name of the given basic block.

source
LLVM.move_beforeFunction
move_before(bb::BasicBlock, pos::BasicBlock)

Move the given basic block before the given position.

source
LLVM.move_afterFunction
move_after(bb::BasicBlock, pos::BasicBlock)

Move the given basic block after the given position.

source

Control flow

Instructions

LLVM.instructionsFunction
instructions(bb::BasicBlock)

Get an iterator over the instructions in the given basic block.

source
LLVM.previnstFunction
previnst(inst::Instruction)

Get the instruction before the given instruction in the basic block, or nothing if there is none.

source
LLVM.nextinstFunction
nextinst(inst::Instruction)

Get the instruction after the given instruction in the basic block, or nothing if there is none.

source
+Basic blocks · LLVM.jl

Basic blocks

LLVM.BasicBlockType
BasicBlock

A basic block in the IR. A basic block is a sequence of instructions that always ends in a terminator instruction.

source
LLVM.BasicBlockMethod
BasicBlock(name::String)

Create a new, empty basic block with the given name.

source
LLVM.BasicBlockMethod
BasicBlock(f::LLVM.Function, name::String)

Create a new, empty basic block with the given name, and insert it at the end of the given function.

source
LLVM.BasicBlockMethod
BasicBlock(bb::BasicBlock, name::String)

Create a new, empty basic block with the given name, and insert it before the given basic block.

source

Properties and operations

LLVM.remove!Method
remove!(bb::BasicBlock)

Remove the given basic block from its parent function, but do not free the object.

source
LLVM.erase!Method
erase!(fun::Function, bb::BasicBlock)

Remove the given basic block from its parent function and free the object.

Warning

This function is unsafe because it does not check if the basic block is used elsewhere.

source
LLVM.parentMethod
parent(bb::BasicBlock) -> LLVM.Function

Get the function that contains the given basic block, or nothing if the block is not part of a function.

source
LLVM.terminatorMethod
terminator(bb::BasicBlock) -> LLVM.Instruction

Get the terminator instruction of the given basic block.

source
LLVM.nameMethod
name(bb::BasicBlock) -> String

Get the name of the given basic block.

source
LLVM.move_beforeFunction
move_before(bb::BasicBlock, pos::BasicBlock)

Move the given basic block before the given position.

source
LLVM.move_afterFunction
move_after(bb::BasicBlock, pos::BasicBlock)

Move the given basic block after the given position.

source

Control flow

Instructions

LLVM.instructionsFunction
instructions(bb::BasicBlock)

Get an iterator over the instructions in the given basic block.

source
LLVM.previnstFunction
previnst(inst::Instruction)

Get the instruction before the given instruction in the basic block, or nothing if there is none.

source
LLVM.nextinstFunction
nextinst(inst::Instruction)

Get the instruction after the given instruction in the basic block, or nothing if there is none.

source
diff --git a/dev/lib/codegen/index.html b/dev/lib/codegen/index.html index da40ed9d..2dd92140 100644 --- a/dev/lib/codegen/index.html +++ b/dev/lib/codegen/index.html @@ -1,4 +1,4 @@ -Code generation · LLVM.jl

Code generation

Targets

LLVM.nameMethod
name(target::Target)

Get the name of the given target.

source
LLVM.hasjitMethod
hasjit(target::Target)

Check if this targets supports the just-in-time compilation.

source

Target machines

LLVM.TargetMachineType
TargetMachine

Primary interface to the complete machine description for the target machine.

All target-specific information should be accessible through this interface.

source
LLVM.disposeMethod
dispose(tm::TargetMachine)

Dispose of the given target machine.

source
LLVM.targetMethod
target(tm::TargetMachine)

Get the target of the given target machine.

source
LLVM.tripleMethod
triple(tm::TargetMachine)

Get the triple of the given target machine.

source
LLVM.cpuMethod
cpu(tm::TargetMachine)

Get the CPU of the given target machine.

source
LLVM.featuresMethod
features(tm::TargetMachine)

Get the feature string of the given target machine.

source
LLVM.asm_verbosity!Function
asm_verbosity!(tm::TargetMachine, verbose::Bool)

Set the verbosity of the target machine's assembly output.

source
LLVM.emitFunction
emit(tm::TargetMachine, mod::Module, filetype::LLVMCodeGenFileType) -> UInt8[]

Generate code for the given module using the target machine, returning the binary data. If assembly code was requested, the binary data can be converted back using String.

source
emit(tm::TargetMachine, mod::Module, filetype::LLVMCodeGenFileType, path::String)

Generate code for the given module using the target machine, writing it to the given file.

source
LLVM.add_transform_info!Function
add_transform_info!(pm::PassManager, [tm::TargetMachine])

Add target-specific analysis passes to the given pass manager.

source
LLVM.add_library_info!Function
add_library_info!(pm::PassManager, triple::String)

Add target-specific library information to the given pass manager.

source
LLVM.JITTargetMachineFunction
JITTargetMachine(; triple=LLVM.triple(), cpu="", features="",
-                 optlevel=API.LLVMCodeGenLevelDefault)

Create a target machine suitable for JIT compilation with the ORC JIT.

source

Data layout

LLVM.DataLayoutType
DataLayout

A parsed version of the target data layout string in and methods for querying it.

The target data layout string is specified by the target - a frontend generating LLVM IR is required to generate the right target data for the target being codegen'd to.

source
LLVM.disposeMethod
dispose(data::DataLayout)

Dispose of the given target data layout.

source
LLVM.byteorderFunction
byteorder(data::DataLayout)

Get the byte order of the target data layout.

source
LLVM.pointersizeFunction
pointersize(data::DataLayout, [addrspace::Integer])

Get the pointer size of the target data layout.

source
LLVM.intptrFunction
intptr(data::DataLayout, [addrspace::Integer])

Get the integer type that is the same size as a pointer for the target data layout.

source
Base.sizeofMethod
sizeof(data::DataLayout, typ::LLVMType)

Get the size of the given type in bytes for the target data layout.

source
LLVM.storage_sizeFunction
storage_size(data::DataLayout, typ::LLVMType)

Get the storage size of the given type in bytes for the target data layout.

source
LLVM.abi_sizeFunction
abi_size(data::DataLayout, typ::LLVMType)

Get the ABI size of the given type in bytes for the target data layout.

source
LLVM.abi_alignmentFunction
abi_alignment(data::DataLayout, typ::LLVMType)

Get the ABI alignment of the given type in bytes for the target data layout.

source
LLVM.frame_alignmentFunction
frame_alignment(data::DataLayout, typ::LLVMType)

Get the call frame alignment of the given type in bytes for the target data layout.

source
LLVM.preferred_alignmentFunction
preferred_alignment(data::DataLayout, typ::LLVMType)
-preferred_alignment(data::DataLayout, var::GlobalVariable)

Get the preferred alignment of the given type or global variable in bytes for the target data layout.

source
LLVM.element_atFunction
element_at(data::DataLayout, typ::StructType, offset::Integer)

Get the element at the given offset in a struct type for the target data layout.

See also: offsetof.

source
LLVM.offsetofFunction
offsetof(data::DataLayout, typ::StructType, element::Integer)

Get the offset of the given element in a struct type for the target data layout.

See also: element_at.

source
+Code generation · LLVM.jl

Code generation

Targets

LLVM.nameMethod
name(target::Target)

Get the name of the given target.

source
LLVM.hasjitMethod
hasjit(target::Target)

Check if this targets supports the just-in-time compilation.

source

Target machines

LLVM.TargetMachineType
TargetMachine

Primary interface to the complete machine description for the target machine.

All target-specific information should be accessible through this interface.

source
LLVM.disposeMethod
dispose(tm::TargetMachine)

Dispose of the given target machine.

source
LLVM.targetMethod
target(tm::TargetMachine)

Get the target of the given target machine.

source
LLVM.tripleMethod
triple(tm::TargetMachine)

Get the triple of the given target machine.

source
LLVM.cpuMethod
cpu(tm::TargetMachine)

Get the CPU of the given target machine.

source
LLVM.featuresMethod
features(tm::TargetMachine)

Get the feature string of the given target machine.

source
LLVM.asm_verbosity!Function
asm_verbosity!(tm::TargetMachine, verbose::Bool)

Set the verbosity of the target machine's assembly output.

source
LLVM.emitFunction
emit(tm::TargetMachine, mod::Module, filetype::LLVMCodeGenFileType) -> UInt8[]

Generate code for the given module using the target machine, returning the binary data. If assembly code was requested, the binary data can be converted back using String.

source
emit(tm::TargetMachine, mod::Module, filetype::LLVMCodeGenFileType, path::String)

Generate code for the given module using the target machine, writing it to the given file.

source
LLVM.add_transform_info!Function
add_transform_info!(pm::PassManager, [tm::TargetMachine])

Add target-specific analysis passes to the given pass manager.

source
LLVM.add_library_info!Function
add_library_info!(pm::PassManager, triple::String)

Add target-specific library information to the given pass manager.

source
LLVM.JITTargetMachineFunction
JITTargetMachine(; triple=LLVM.triple(), cpu="", features="",
+                 optlevel=API.LLVMCodeGenLevelDefault)

Create a target machine suitable for JIT compilation with the ORC JIT.

source

Data layout

LLVM.DataLayoutType
DataLayout

A parsed version of the target data layout string in and methods for querying it.

The target data layout string is specified by the target - a frontend generating LLVM IR is required to generate the right target data for the target being codegen'd to.

source
LLVM.disposeMethod
dispose(data::DataLayout)

Dispose of the given target data layout.

source
LLVM.byteorderFunction
byteorder(data::DataLayout)

Get the byte order of the target data layout.

source
LLVM.pointersizeFunction
pointersize(data::DataLayout, [addrspace::Integer])

Get the pointer size of the target data layout.

source
LLVM.intptrFunction
intptr(data::DataLayout, [addrspace::Integer])

Get the integer type that is the same size as a pointer for the target data layout.

source
Base.sizeofMethod
sizeof(data::DataLayout, typ::LLVMType)

Get the size of the given type in bytes for the target data layout.

source
LLVM.storage_sizeFunction
storage_size(data::DataLayout, typ::LLVMType)

Get the storage size of the given type in bytes for the target data layout.

source
LLVM.abi_sizeFunction
abi_size(data::DataLayout, typ::LLVMType)

Get the ABI size of the given type in bytes for the target data layout.

source
LLVM.abi_alignmentFunction
abi_alignment(data::DataLayout, typ::LLVMType)

Get the ABI alignment of the given type in bytes for the target data layout.

source
LLVM.frame_alignmentFunction
frame_alignment(data::DataLayout, typ::LLVMType)

Get the call frame alignment of the given type in bytes for the target data layout.

source
LLVM.preferred_alignmentFunction
preferred_alignment(data::DataLayout, typ::LLVMType)
+preferred_alignment(data::DataLayout, var::GlobalVariable)

Get the preferred alignment of the given type or global variable in bytes for the target data layout.

source
LLVM.element_atFunction
element_at(data::DataLayout, typ::StructType, offset::Integer)

Get the element at the given offset in a struct type for the target data layout.

See also: offsetof.

source
LLVM.offsetofFunction
offsetof(data::DataLayout, typ::StructType, element::Integer)

Get the offset of the given element in a struct type for the target data layout.

See also: element_at.

source
diff --git a/dev/lib/essentials/index.html b/dev/lib/essentials/index.html index a94c6070..d9966fc8 100644 --- a/dev/lib/essentials/index.html +++ b/dev/lib/essentials/index.html @@ -1,18 +1,18 @@ -Essentials · LLVM.jl

Essentials

Initialization

LLVM.backendsFunction
backends()

Return a list of back-ends supported by the LLVM library.

source
LLVM.InitializeAllTargetsFunction
LLVM.InitializeAllTargets()
+Essentials · LLVM.jl

Essentials

Initialization

LLVM.backendsFunction
backends()

Return a list of back-ends supported by the LLVM library.

source
LLVM.InitializeAllTargetsFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeAllAsmParsersFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeAllAsmPrintersFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeAllAsmPrintersFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeAllDisassemblersFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source

Contexts

LLVM.ContextType
LLVM.Context

Execution state for the core LLVM IR system. Created by calling the Context() constructor, and should be disposed of.

Most types are tied to a context instance. Multiple contexts can exist simultaneously. A single context is not thread safe. However, different contexts can execute on different threads simultaneously.

source
LLVM.ContextMethod
LLVM.Context(; opaque_pointers=nothing)

Create a new LLVM context. If opaque_pointers is true, the context will use opaque pointers instead of typed pointers (if suppoprted). Otherwise the behavior of the context depends on the LLVM version.

This object needs to be disposed of using dispose(::Context).

source
LLVM.disposeMethod
dispose(ctx::Context)

Dispose of the context, releasing all resources associated with it. The context should not be used after this operation.

source

LLVM.jl also tracks the context in task-local scope:

LLVM.contextMethod
context(; throw_error::Bool=true)

Get the active LLVM context for the current tasks. Throws an exception if no context is active, unless throw_error=false.

source
LLVM.activateMethod
activate(ctx::LLVM.Context)

Pushes a new context onto the context stack.

source
LLVM.deactivateMethod
deactivate(ctx::LLVM.Context)

Pops the current context from the context stack.

source
LLVM.context!Function
context!(ctx::LLVM.Context) do
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source

Contexts

LLVM.ContextType
LLVM.Context

Execution state for the core LLVM IR system. Created by calling the Context() constructor, and should be disposed of.

Most types are tied to a context instance. Multiple contexts can exist simultaneously. A single context is not thread safe. However, different contexts can execute on different threads simultaneously.

source
LLVM.ContextMethod
LLVM.Context(; opaque_pointers=nothing)

Create a new LLVM context. If opaque_pointers is true, the context will use opaque pointers instead of typed pointers (if suppoprted). Otherwise the behavior of the context depends on the LLVM version.

This object needs to be disposed of using dispose(::Context).

source
LLVM.disposeMethod
dispose(ctx::Context)

Dispose of the context, releasing all resources associated with it. The context should not be used after this operation.

source

LLVM.jl also tracks the context in task-local scope:

LLVM.contextMethod
context(; throw_error::Bool=true)

Get the active LLVM context for the current tasks. Throws an exception if no context is active, unless throw_error=false.

source
LLVM.activateMethod
activate(ctx::LLVM.Context)

Pushes a new context onto the context stack.

source
LLVM.deactivateMethod
deactivate(ctx::LLVM.Context)

Pops the current context from the context stack.

source
LLVM.context!Function
context!(ctx::LLVM.Context) do
     ...
-end

Temporarily activates the given context for the duration of the block.

source
LLVM.ts_contextFunction
ts_context(; throw_error::Bool=true)

Get the active LLVM thread-safe context for the current tasks. Throws an exception if no context is active, unless throw_error=false.

source
LLVM.activateMethod
activate(ts_ctx::LLVM.ThreadSafeContext)

Pushes a new thread-safe context onto the context stack.

source
LLVM.deactivateMethod
deactivate(ts_ctx::LLVM.ThreadSafeContext)

Pops the current thread-safe context from the context stack.

source
LLVM.ts_context!Function
ts_context!(ts_ctx::LLVM.ThreadSafeContext) do
+end

Temporarily activates the given context for the duration of the block.

source
LLVM.ts_contextFunction
ts_context(; throw_error::Bool=true)

Get the active LLVM thread-safe context for the current tasks. Throws an exception if no context is active, unless throw_error=false.

source
LLVM.activateMethod
activate(ts_ctx::LLVM.ThreadSafeContext)

Pushes a new thread-safe context onto the context stack.

source
LLVM.deactivateMethod
deactivate(ts_ctx::LLVM.ThreadSafeContext)

Pops the current thread-safe context from the context stack.

source
LLVM.ts_context!Function
ts_context!(ts_ctx::LLVM.ThreadSafeContext) do
     ...
-end

Temporarily activates the given thread-safe context for the duration of the block.

source

Resources

LLVM.@disposeMacro
@dispose foo=Foo() bar=Bar() begin
+end

Temporarily activates the given thread-safe context for the duration of the block.

source

Resources

LLVM.@disposeMacro
@dispose foo=Foo() bar=Bar() begin
     ...
-end

Helper macro for disposing resources (by calling the dispose function for every resource in reverse order) after executing a block of code. This is often equivalent to calling the recourse constructor with do-block syntax, but without using (potentially costly) closures.

source

Exceptions

LLVM.LLVMExceptionType
LLVMException

Exception type for errors in the LLVM API. Possibly thrown by diagnostic handlers, and fatal eror handlers.

source

Memory buffers

LLVM.MemoryBufferMethod
MemoryBuffer(data::Vector{T}, name::String="", copy::Bool=true)

Create a memory buffer from the given data. If copy is true, the data is copied into the buffer. Otherwise, the user is responsible for keeping the data alive across the lifetime of the buffer.

This object needs to be disposed of using dispose.

source
LLVM.MemoryBufferFileFunction
MemoryBufferFile(path::String)

Create a memory buffer from the contents of a file.

This object needs to be disposed of using dispose.

source
LLVM.disposeMethod
dispose(membuf::MemoryBuffer)

Dispose of the given memory buffer.

source

Other

LLVM.cloptsFunction
clopts(opts...)

Parse the given arguments using the LLVM command-line parser.

Note that this function modifies the global state of the LLVM library. It is also not safe to rely on the stability of the command-line options between different versions of LLVM.

source
+end

Helper macro for disposing resources (by calling the dispose function for every resource in reverse order) after executing a block of code. This is often equivalent to calling the recourse constructor with do-block syntax, but without using (potentially costly) closures.

source

Exceptions

LLVM.LLVMExceptionType
LLVMException

Exception type for errors in the LLVM API. Possibly thrown by diagnostic handlers, and fatal eror handlers.

source

Memory buffers

LLVM.MemoryBufferMethod
MemoryBuffer(data::Vector{T}, name::String="", copy::Bool=true)

Create a memory buffer from the given data. If copy is true, the data is copied into the buffer. Otherwise, the user is responsible for keeping the data alive across the lifetime of the buffer.

This object needs to be disposed of using dispose.

source
LLVM.MemoryBufferFileFunction
MemoryBufferFile(path::String)

Create a memory buffer from the contents of a file.

This object needs to be disposed of using dispose.

source
LLVM.disposeMethod
dispose(membuf::MemoryBuffer)

Dispose of the given memory buffer.

source

Other

LLVM.cloptsFunction
clopts(opts...)

Parse the given arguments using the LLVM command-line parser.

Note that this function modifies the global state of the LLVM library. It is also not safe to rely on the stability of the command-line options between different versions of LLVM.

source
diff --git a/dev/lib/execution/index.html b/dev/lib/execution/index.html index 5feb7062..574972ac 100644 --- a/dev/lib/execution/index.html +++ b/dev/lib/execution/index.html @@ -1,2 +1,2 @@ -Execution · LLVM.jl

Execution

Generic Value

LLVM.GenericValueType
GenericValue

A generic value that can be passed to or returned from a function in the execution engine.

Note that only simple types are supported, and for most use cases it is recommended to look up the address of the compiled function and ccall it directly.

This object needs to be disposed of using dispose.

source
LLVM.disposeMethod
dispose(val::GenericValue)

Dispose of the given generic value.

source

Integer

LLVM.GenericValueMethod
GenericValue(typ::LLVM.IntegerType, N::Integer)

Create a generic value from an integer of the given type.

source
LLVM.intwidthFunction
intwidth(val::GenericValue)

Get the bit width of the integer value stored in the generic value.

source
Base.convertMethod
convert(::Type{<:Integer}, val::GenericValue)

Convert a generic value to an integer of the given type.

source

Floating Point

LLVM.GenericValueMethod
GenericValue(typ::LLVM.FloatingPointType, N::AbstractFloat)

Create a generic value from a floating point number of the given type.

source
Base.convertMethod
convert(::Type{<:AbstractFloat}, val::GenericValue, typ::LLVM.FloatingPointType)

Convert a generic value to a floating point number of the given type.

Contrary to the integer conversion, the LLVM type is also required to be passed explicitly.

source

Pointer

Base.convertMethod
convert(::Type{Ptr{T}}, val::GenericValue)

Convert a generic value to a pointer.

source

MCJIT

LLVM.InterpreterFunction
Interpreter(mod::Module)

Create an interpreter for the given module.

This object needs to be disposed of using dispose.

source
LLVM.JITFunction
JIT(mod::Module)

Create a JIT compiler for the given module.

This object needs to be disposed of using dispose.

source
LLVM.disposeMethod
dispose(engine::ExecutionEngine)

Dispose of the given execution engine.

source
Base.push!Method
push!(engine::LLVM.ExecutionEngine, mod::Module)

Add another module to the execution engine.

This takes ownership of the module.

source
Base.delete!Method
delete!(engine::ExecutionEngine, mod::Module)

Remove a module from the execution engine.

Ownership of the module is transferred back to the user.

source
Base.runMethod
run(engine::ExecutionEngine, f::Function, [args::Vector{GenericValue}])

Run the given function with the given arguments in the execution engine.

source
LLVM.lookupMethod
lookup(engine::ExecutionEngine, fn::String)

Look up the address of the given function in the execution engine.

source
LLVM.functionsMethod
functions(engine::ExecutionEngine)

Get an iterator over the functions in the execution engine.

The iterator object is not actually iterable, but supports get and haskey queries with function names, and getindex to get the function object.

source

ORCJIT

LLVM.contextMethod
context(ts_ctx::ThreadSafeContext)

Obtain the context associated with a thread-safe context.

Warning

This is an usafe operation, as the return context can be accessed in a thread-unsafe manner.

source
LLVM.disposeMethod
dispose(ctx::ThreadSafeContext)

Dispose of the thread-safe context, releasing all resources associated with it.

source
LLVM.ThreadSafeModuleMethod
(mod::ThreadSafeModule)(f)

Apply f to the LLVM module contained within mod, after locking the module and activating its context.

source
LLVM.disposeMethod
dispose(mod::ThreadSafeModule)

Dispose of the thread-safe module, releasing all resources associated with it.

source
LLVM.LLJITType
LLJIT(::LLJITBuilder)

Creates a LLJIT stack based on the provided builder.

Note

Takes ownership of the provided builder.

source
LLJIT(;tm::Union{Nothing, TargetMachine})

Use the provided TargetMachine and construct an LLJIT from it.

source
LLVM.JITDylibType
JITDylib(lljit::LLJIT)

Get the main JITDylib

source
JITDylib(es::ExecutionSession, name; bare=false)

Adds a new JITDylib to the ExecutionSession. The name must be unique and the bare=true no standard platform symbols are made available.

source
JITDylib(jljit::JuliaOJIT)

Get the external JITDylib from the Julia JIT

source
LLVM.lookupMethod
lookup(lljit::LLJIT, name)

Takes an unmangled symbol names and searches for it in the LLJIT.

source
LLVM.linkinglayercreator!Function
linkinglayercreator!(builder::LLJITBuilder, creator::ObjectLinkingLayerCreator)
Warning

The creator object needs to be rooted by the caller for the lifetime of the builder argument.

source
+Execution · LLVM.jl

Execution

Generic Value

LLVM.GenericValueType
GenericValue

A generic value that can be passed to or returned from a function in the execution engine.

Note that only simple types are supported, and for most use cases it is recommended to look up the address of the compiled function and ccall it directly.

This object needs to be disposed of using dispose.

source
LLVM.disposeMethod
dispose(val::GenericValue)

Dispose of the given generic value.

source

Integer

LLVM.GenericValueMethod
GenericValue(typ::LLVM.IntegerType, N::Integer)

Create a generic value from an integer of the given type.

source
LLVM.intwidthFunction
intwidth(val::GenericValue)

Get the bit width of the integer value stored in the generic value.

source
Base.convertMethod
convert(::Type{<:Integer}, val::GenericValue)

Convert a generic value to an integer of the given type.

source

Floating Point

LLVM.GenericValueMethod
GenericValue(typ::LLVM.FloatingPointType, N::AbstractFloat)

Create a generic value from a floating point number of the given type.

source
Base.convertMethod
convert(::Type{<:AbstractFloat}, val::GenericValue, typ::LLVM.FloatingPointType)

Convert a generic value to a floating point number of the given type.

Contrary to the integer conversion, the LLVM type is also required to be passed explicitly.

source

Pointer

Base.convertMethod
convert(::Type{Ptr{T}}, val::GenericValue)

Convert a generic value to a pointer.

source

MCJIT

LLVM.InterpreterFunction
Interpreter(mod::Module)

Create an interpreter for the given module.

This object needs to be disposed of using dispose.

source
LLVM.JITFunction
JIT(mod::Module)

Create a JIT compiler for the given module.

This object needs to be disposed of using dispose.

source
LLVM.disposeMethod
dispose(engine::ExecutionEngine)

Dispose of the given execution engine.

source
Base.push!Method
push!(engine::LLVM.ExecutionEngine, mod::Module)

Add another module to the execution engine.

This takes ownership of the module.

source
Base.delete!Method
delete!(engine::ExecutionEngine, mod::Module)

Remove a module from the execution engine.

Ownership of the module is transferred back to the user.

source
Base.runMethod
run(engine::ExecutionEngine, f::Function, [args::Vector{GenericValue}])

Run the given function with the given arguments in the execution engine.

source
LLVM.lookupMethod
lookup(engine::ExecutionEngine, fn::String)

Look up the address of the given function in the execution engine.

source
LLVM.functionsMethod
functions(engine::ExecutionEngine)

Get an iterator over the functions in the execution engine.

The iterator object is not actually iterable, but supports get and haskey queries with function names, and getindex to get the function object.

source

ORCJIT

LLVM.contextMethod
context(ts_ctx::ThreadSafeContext)

Obtain the context associated with a thread-safe context.

Warning

This is an usafe operation, as the return context can be accessed in a thread-unsafe manner.

source
LLVM.disposeMethod
dispose(ctx::ThreadSafeContext)

Dispose of the thread-safe context, releasing all resources associated with it.

source
LLVM.ThreadSafeModuleMethod
(mod::ThreadSafeModule)(f)

Apply f to the LLVM module contained within mod, after locking the module and activating its context.

source
LLVM.disposeMethod
dispose(mod::ThreadSafeModule)

Dispose of the thread-safe module, releasing all resources associated with it.

source
LLVM.LLJITType
LLJIT(::LLJITBuilder)

Creates a LLJIT stack based on the provided builder.

Note

Takes ownership of the provided builder.

source
LLJIT(;tm::Union{Nothing, TargetMachine})

Use the provided TargetMachine and construct an LLJIT from it.

source
LLVM.JITDylibType
JITDylib(lljit::LLJIT)

Get the main JITDylib

source
JITDylib(es::ExecutionSession, name; bare=false)

Adds a new JITDylib to the ExecutionSession. The name must be unique and the bare=true no standard platform symbols are made available.

source
JITDylib(jljit::JuliaOJIT)

Get the external JITDylib from the Julia JIT

source
LLVM.lookupMethod
lookup(lljit::LLJIT, name)

Takes an unmangled symbol names and searches for it in the LLJIT.

source
LLVM.linkinglayercreator!Function
linkinglayercreator!(builder::LLJITBuilder, creator::ObjectLinkingLayerCreator)
Warning

The creator object needs to be rooted by the caller for the lifetime of the builder argument.

source
diff --git a/dev/lib/functions/index.html b/dev/lib/functions/index.html index ea3bcc4b..1bdd3521 100644 --- a/dev/lib/functions/index.html +++ b/dev/lib/functions/index.html @@ -1,2 +1,2 @@ -Functions · LLVM.jl

Functions

LLVM.FunctionMethod
LLVM.Function(mod::Module, name::String, ft::FunctionType)

Create a new function in the given module with the given name and function type.

source

Properties and operations

LLVM.function_typeFunction
function_type(f::Function) -> LLVM.FunctionType

Get the function type of the given function. This returns a function type, as opposed to value_type which returns the pointer type of the function constant.

source
Base.empty!Function
empty!(f::Function)

Delete the body of the given function, and convert the linkage to external.

source
LLVM.erase!Method
erase!(f::Function)

Remove the given function from its parent module and free the object.

Warning

This function is unsafe because it does not check if the function is used elsewhere.

source
LLVM.personalityFunction
personality(f::Function)

Get the personality function of the given function, or nothing if it has none.

source
LLVM.personality!Function
personality!(f::Function, persfn::Function)

Set the personality function of the given function. Pass nothing to remove the personality function.

source
LLVM.callconvFunction
callconv(f::Function)

Get the calling convention of the given function.

source
callconv(call_inst::Instruction)

Get the calling convention of the given callable instruction.

source
LLVM.callconv!Function
callconv!(f::Function, cc)

Set the calling convention of the given function.

source
callconv!(call_inst::Instruction, cc)

Set the calling convention of the given callable instruction.

source
LLVM.gcFunction
gc(f::Function)

Get the garbage collector name of the given function, or an empty string if it has none.

source
LLVM.gc!Function
gc!(f::Function, name::String)

Set the garbage collector name of the given function.

source
LLVM.entryFunction
entry(f::Function) -> BasicBlock

Get the entry basic block of the given function.

source

Attributes

LLVM.function_attributesFunction
function_attributes(f::Function)

Get the attributes of the given function.

This is a mutable iterator, supporting push!, append! and delete!.

source
LLVM.parameter_attributesFunction
parameter_attributes(f::Function, idx::Integer)

Get the attributes of the given parameter of the given function.

This is a mutable iterator, supporting push!, append! and delete!.

source
LLVM.return_attributesFunction
return_attributes(f::Function)

Get the attributes of the return value of the given function.

This is a mutable iterator, supporting push!, append! and delete!.

source

Parameters

LLVM.parametersFunction
parameters(ft::LLVM.FunctionType)

Get the parameter types of the given function type.

source
parameters(f::Function)

Get an iterator over the parameters of the given function. These are values that can be used as inputs to other instructions.

source

Basic Blocks

LLVM.blocksFunction
blocks(f::Function)

Get an iterator over the basic blocks of the given function.

source
LLVM.prevblockFunction
prevblock(bb::BasicBlock)

Get the previous basic block of the given basic block, or nothing if there is none.

source
LLVM.nextblockFunction
nextblock(bb::BasicBlock)

Get the next basic block of the given basic block, or nothing if there is none.

source

Intrinsics

LLVM.nameMethod
name(intr::LLVM.Intrinsic)

Get the name of the given intrinsic.

source
LLVM.nameMethod
name(intr::LLVM.Intrinsic, params::Vector{<:LLVMType})

Get the name of the given overloaded intrinsic with the given parameter types.

source
LLVM.FunctionMethod
Function(mod::Module, intr::Intrinsic, params::Vector{<:LLVMType}=LLVMType[])

Get the declaration of the given intrinsic in the given module.

source
LLVM.FunctionTypeMethod
FunctionType(intr::Intrinsic, params::Vector{<:LLVMType}=LLVMType[])

Get the function type of the given intrinsic with the given parameter types.

source
+Functions · LLVM.jl

Functions

LLVM.FunctionMethod
LLVM.Function(mod::Module, name::String, ft::FunctionType)

Create a new function in the given module with the given name and function type.

source

Properties and operations

LLVM.function_typeFunction
function_type(f::Function) -> LLVM.FunctionType

Get the function type of the given function. This returns a function type, as opposed to value_type which returns the pointer type of the function constant.

source
Base.empty!Function
empty!(f::Function)

Delete the body of the given function, and convert the linkage to external.

source
LLVM.erase!Method
erase!(f::Function)

Remove the given function from its parent module and free the object.

Warning

This function is unsafe because it does not check if the function is used elsewhere.

source
LLVM.personalityFunction
personality(f::Function)

Get the personality function of the given function, or nothing if it has none.

source
LLVM.personality!Function
personality!(f::Function, persfn::Function)

Set the personality function of the given function. Pass nothing to remove the personality function.

source
LLVM.callconvFunction
callconv(f::Function)

Get the calling convention of the given function.

source
callconv(call_inst::Instruction)

Get the calling convention of the given callable instruction.

source
LLVM.callconv!Function
callconv!(f::Function, cc)

Set the calling convention of the given function.

source
callconv!(call_inst::Instruction, cc)

Set the calling convention of the given callable instruction.

source
LLVM.gcFunction
gc(f::Function)

Get the garbage collector name of the given function, or an empty string if it has none.

source
LLVM.gc!Function
gc!(f::Function, name::String)

Set the garbage collector name of the given function.

source
LLVM.entryFunction
entry(f::Function) -> BasicBlock

Get the entry basic block of the given function.

source

Attributes

LLVM.function_attributesFunction
function_attributes(f::Function)

Get the attributes of the given function.

This is a mutable iterator, supporting push!, append! and delete!.

source
LLVM.parameter_attributesFunction
parameter_attributes(f::Function, idx::Integer)

Get the attributes of the given parameter of the given function.

This is a mutable iterator, supporting push!, append! and delete!.

source
LLVM.return_attributesFunction
return_attributes(f::Function)

Get the attributes of the return value of the given function.

This is a mutable iterator, supporting push!, append! and delete!.

source

Parameters

LLVM.parametersFunction
parameters(ft::LLVM.FunctionType)

Get the parameter types of the given function type.

source
parameters(f::Function)

Get an iterator over the parameters of the given function. These are values that can be used as inputs to other instructions.

source

Basic Blocks

LLVM.blocksFunction
blocks(f::Function)

Get an iterator over the basic blocks of the given function.

source
LLVM.prevblockFunction
prevblock(bb::BasicBlock)

Get the previous basic block of the given basic block, or nothing if there is none.

source
LLVM.nextblockFunction
nextblock(bb::BasicBlock)

Get the next basic block of the given basic block, or nothing if there is none.

source

Intrinsics

LLVM.nameMethod
name(intr::LLVM.Intrinsic)

Get the name of the given intrinsic.

source
LLVM.nameMethod
name(intr::LLVM.Intrinsic, params::Vector{<:LLVMType})

Get the name of the given overloaded intrinsic with the given parameter types.

source
LLVM.FunctionMethod
Function(mod::Module, intr::Intrinsic, params::Vector{<:LLVMType}=LLVMType[])

Get the declaration of the given intrinsic in the given module.

source
LLVM.FunctionTypeMethod
FunctionType(intr::Intrinsic, params::Vector{<:LLVMType}=LLVMType[])

Get the function type of the given intrinsic with the given parameter types.

source
diff --git a/dev/lib/hidden/index.html b/dev/lib/hidden/index.html index a8b25f4f..ad7476e7 100644 --- a/dev/lib/hidden/index.html +++ b/dev/lib/hidden/index.html @@ -1,242 +1,242 @@ Hidden · LLVM.jl

Hidden

Hidden docstrings that we don't want to show up, but we want to avoid failing checkdocs for:

LLVM.InitializeAArch64AsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeAArch64AsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeAArch64DisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeAArch64TargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeAMDGPUAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeAMDGPUAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeAMDGPUDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeAMDGPUTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeARCAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeARCAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeARCAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeARCDisassemblerFunction
LLVM.InitializeAllDisassemblers()
+LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeARCDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeARCTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeARCTargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeARCTargetMCFunction
LLVM.InitializeAllTargetMCs()
-LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeARCTargetMCFunction
LLVM.InitializeAllTargetMCs()
+LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeARMAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeARMAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeARMAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeARMDisassemblerFunction
LLVM.InitializeAllDisassemblers()
+LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeARMDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeARMTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeARMTargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeARMTargetMCFunction
LLVM.InitializeAllTargetMCs()
-LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeARMTargetMCFunction
LLVM.InitializeAllTargetMCs()
+LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeAVRAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeAVRAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeAVRAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeAVRDisassemblerFunction
LLVM.InitializeAllDisassemblers()
+LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeAVRDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeAVRTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeAVRTargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeAVRTargetMCFunction
LLVM.InitializeAllTargetMCs()
-LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeAVRTargetMCFunction
LLVM.InitializeAllTargetMCs()
+LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeBPFAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeBPFAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeBPFAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeBPFDisassemblerFunction
LLVM.InitializeAllDisassemblers()
+LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeBPFDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeBPFTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeBPFTargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeBPFTargetMCFunction
LLVM.InitializeAllTargetMCs()
-LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeBPFTargetMCFunction
LLVM.InitializeAllTargetMCs()
+LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeColossusAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeColossusAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeColossusDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeHexagonAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeHexagonAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeHexagonDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeHexagonTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeLanaiAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeLanaiAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeLanaiAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeLanaiDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeLanaiTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeLanaiTargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeMipsAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeMipsAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeMipsAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeMipsDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeMipsTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeMipsTargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeMSP430AsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeMSP430AsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeMSP430DisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeMSP430TargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeNativeAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeNativeAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeNativeDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeNativeTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeNVPTXAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeNVPTXAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeNVPTXAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeNVPTXDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeNVPTXTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeNVPTXTargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializePowerPCAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializePowerPCAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializePowerPCDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializePowerPCTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeRISCVAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeRISCVAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeRISCVAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeRISCVDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeRISCVTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeRISCVTargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeSparcAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeSparcAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeSparcAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeSparcDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeSparcTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeSparcTargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeSystemZAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeSystemZAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeSystemZDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeSystemZTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeVEAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeVEAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeVEAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeVEDisassemblerFunction
LLVM.InitializeAllDisassemblers()
+LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeVEDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeVETargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeVETargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeVETargetMCFunction
LLVM.InitializeAllTargetMCs()
-LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeVETargetMCFunction
LLVM.InitializeAllTargetMCs()
+LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeWebAssemblyAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeWebAssemblyAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeWebAssemblyDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeX86AsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeX86AsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeX86AsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeX86DisassemblerFunction
LLVM.InitializeAllDisassemblers()
+LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeX86DisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeX86TargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeX86TargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.InitializeX86TargetMCFunction
LLVM.InitializeAllTargetMCs()
-LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeX86TargetMCFunction
LLVM.InitializeAllTargetMCs()
+LLVM.InitializeXXXTargetMC()

Enable use of machine code generation for specific targets.

source
LLVM.InitializeXCoreAsmParserFunction
LLVM.InitializeAllAsmParsers()
 LLVM.InitializeXXXAsmParser()
-LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeXCoreAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
+LLVM.InitializeNativeAsmParser()

Enables use of assembly parsing functionality for specific targets.

source
LLVM.InitializeXCoreAsmPrinterFunction
LLVM.InitializeAllAsmPrinters()
 LLVM.InitializeXXXAsmPrinter()
-LLVM.InitializeNativeAsmPrinter()

Enables use of assembly output functionality for specific targets.

source
LLVM.InitializeXCoreDisassemblerFunction
LLVM.InitializeAllDisassemblers()
 LLVM.InitializeXXXDisassembler()
-LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeXCoreTargetFunction
LLVM.InitializeAllTargets()
+LLVM.InitializeNativeDisassembler()

Enables use of disassembly functionality for specific targets.

source
LLVM.InitializeXCoreTargetFunction
LLVM.InitializeAllTargets()
 LLVM.InitializeXXXTarget()
-LLVM.InitializeNativeTarget()

Enables use of specific targets.

source
LLVM.Int1TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int8TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int16TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int32TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int64TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int128TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int1TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int8TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int16TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int32TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int64TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.Int128TypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.NewPMModulePassManagerFunction
NewPMModulePassManager()
 NewPMCGSCCPassManager()
 NewPMFunctionPassManager()
 NewPMLoopPassManager(; use_memory_ssa=false)
 NewPMAAManager()

Create a new pass manager of the specified type. These objects can be used to construct pass pipelines, by add!ing passes to them, and finally add!ing them to a parent pass manager or pass builder.

Creating a pass manager and adding it to a parent manager or builder can be shortened using a single add!:

add!(parent, NewPMModulePassManager()) do mpm
     add!(mpm, SomeModulePass())
-end

See also: add!, NewPMPassBuilder

source
LLVM.NewPMCGSCCPassManagerFunction
NewPMModulePassManager()
 NewPMCGSCCPassManager()
 NewPMFunctionPassManager()
 NewPMLoopPassManager(; use_memory_ssa=false)
 NewPMAAManager()

Create a new pass manager of the specified type. These objects can be used to construct pass pipelines, by add!ing passes to them, and finally add!ing them to a parent pass manager or pass builder.

Creating a pass manager and adding it to a parent manager or builder can be shortened using a single add!:

add!(parent, NewPMModulePassManager()) do mpm
     add!(mpm, SomeModulePass())
-end

See also: add!, NewPMPassBuilder

source
LLVM.NewPMFunctionPassManagerFunction
NewPMModulePassManager()
 NewPMCGSCCPassManager()
 NewPMFunctionPassManager()
 NewPMLoopPassManager(; use_memory_ssa=false)
 NewPMAAManager()

Create a new pass manager of the specified type. These objects can be used to construct pass pipelines, by add!ing passes to them, and finally add!ing them to a parent pass manager or pass builder.

Creating a pass manager and adding it to a parent manager or builder can be shortened using a single add!:

add!(parent, NewPMModulePassManager()) do mpm
     add!(mpm, SomeModulePass())
-end

See also: add!, NewPMPassBuilder

source
LLVM.NewPMLoopPassManagerFunction
NewPMModulePassManager()
 NewPMCGSCCPassManager()
 NewPMFunctionPassManager()
 NewPMLoopPassManager(; use_memory_ssa=false)
 NewPMAAManager()

Create a new pass manager of the specified type. These objects can be used to construct pass pipelines, by add!ing passes to them, and finally add!ing them to a parent pass manager or pass builder.

Creating a pass manager and adding it to a parent manager or builder can be shortened using a single add!:

add!(parent, NewPMModulePassManager()) do mpm
     add!(mpm, SomeModulePass())
-end

See also: add!, NewPMPassBuilder

source
LLVM.NewPMAAManagerType
NewPMModulePassManager()
 NewPMCGSCCPassManager()
 NewPMFunctionPassManager()
 NewPMLoopPassManager(; use_memory_ssa=false)
 NewPMAAManager()

Create a new pass manager of the specified type. These objects can be used to construct pass pipelines, by add!ing passes to them, and finally add!ing them to a parent pass manager or pass builder.

Creating a pass manager and adding it to a parent manager or builder can be shortened using a single add!:

add!(parent, NewPMModulePassManager()) do mpm
     add!(mpm, SomeModulePass())
-end

See also: add!, NewPMPassBuilder

source
LLVM.NewPMModulePassFunction
NewPMModulePass(name, callback)
-NewPMFunctionPass(name, callback)

Create a new custom pass. The name is a string that will be used to identify the pass in the pass manager. The callback is a function that will be called when the pass is run. The function should take a single argument, the module or function to be processed, and return a boolean indicating whether the pass made any changes.

Before using a custom pass, it must be registered with a pass builder using register!.

See also: register!

source
LLVM.NewPMFunctionPassFunction
NewPMModulePass(name, callback)
-NewPMFunctionPass(name, callback)

Create a new custom pass. The name is a string that will be used to identify the pass in the pass manager. The callback is a function that will be called when the pass is run. The function should take a single argument, the module or function to be processed, and return a boolean indicating whether the pass made any changes.

Before using a custom pass, it must be registered with a pass builder using register!.

See also: register!

source
+end

See also: add!, NewPMPassBuilder

source
LLVM.NewPMModulePassFunction
NewPMModulePass(name, callback)
+NewPMFunctionPass(name, callback)

Create a new custom pass. The name is a string that will be used to identify the pass in the pass manager. The callback is a function that will be called when the pass is run. The function should take a single argument, the module or function to be processed, and return a boolean indicating whether the pass made any changes.

Before using a custom pass, it must be registered with a pass builder using register!.

See also: register!

source
LLVM.NewPMFunctionPassFunction
NewPMModulePass(name, callback)
+NewPMFunctionPass(name, callback)

Create a new custom pass. The name is a string that will be used to identify the pass in the pass manager. The callback is a function that will be called when the pass is run. The function should take a single argument, the module or function to be processed, and return a boolean indicating whether the pass made any changes.

Before using a custom pass, it must be registered with a pass builder using register!.

See also: register!

source
diff --git a/dev/lib/instructions/index.html b/dev/lib/instructions/index.html index 6480070e..cb28fdaf 100644 --- a/dev/lib/instructions/index.html +++ b/dev/lib/instructions/index.html @@ -1,3 +1,3 @@ -Instructions · LLVM.jl

Instructions

Base.copyMethod
copy(inst::Instruction)

Create a copy of the given instruction.

source
LLVM.remove!Method
remove!(inst::Instruction)

Remove the given instruction from the containing basic block, but do not delete the object.

source
LLVM.erase!Method
erase!(inst::Instruction)

Remove the given instruction from the containing basic block and delete the object.

Warning

This function is unsafe because it does not check if the instruction is used elsewhere.

source
LLVM.parentMethod
parent(inst::Instruction)

Get the basic block that contains the given instruction.

source

Creating instructions

LLVM.IRBuilderType
IRBuilder

An instruction builder, which is used to build instructions within a basic block.

source
LLVM.IRBuilderMethod
IRBuilder()

Create a new, unpositioned instruction builder.

This object needs to be disposed of using dispose.

source
LLVM.disposeMethod
dispose(builder::IRBuilder)

Dispose of an instruction builder.

source
LLVM.contextMethod
context(builder::IRBuilder)

Get the context associated with an instruction builder.

source
Base.positionFunction
position(builder::IRBuilder)

Return the current position of the instruction builder.

source
LLVM.position!Method
position!(builder::IRBuilder, inst::Instruction)

Position the instruction builder before the given instruction.

source
LLVM.position!Method
position!(builder::IRBuilder, bb::BasicBlock)

Position the instruction builder at the end of the given basic block.

source
LLVM.position!Method
position!(builder::IRBuilder)

Clear the current position of the instruction builder.

source
Base.insert!Method
insert!(builder::IRBuilder, inst::Instruction, [name::String])

Insert an instruction into the current basic block at the current position, optionally giving it a name.

source
LLVM.debuglocationFunction
debuglocation(builder::IRBuilder)

Get the current debug location of the instruction builder, or nothing if no location is set.

source
LLVM.debuglocation!Function
debuglocation!(builder::IRBuilder)

Clear the current debug location of the instruction builder.

source
debuglocation!(builder::IRBuilder, loc)

Set the current debug location of the instruction builder to loc, which can be a Metadata or MetadataAsValue.

source
debuglocation!(builder::IRBuilder, inst::Instruction)

Set the current debug location of the instruction builder to the location of the given instruction.

source

Comparison instructions

LLVM.predicateFunction
predicate(inst::ICmpInst)
-predicate(inst::FCmpInst)

Get the comparison predicate of the given integer or floating-point comparison instruction.

source

Atomic instructions

LLVM.is_atomicFunction
is_atomic(inst::Instruction)

Check if the given instruction is atomic. This includes atomic operations such as atomicrmw or fence, but also loads and stores that have been made atomic by setting an atomic ordering.

source
LLVM.orderingFunction
ordering(atomic_inst::Instruction)

Get the atomic ordering of the given atomic instruction.

source
LLVM.ordering!Function
ordering!(inst::Instruction, ordering::LLVM.AtomicOrdering)

Set the atomic ordering of the given instruction.

source
LLVM.syncscopeFunction
syncscope(inst::AtomicInst)

Get the synchronization scope of the given atomic instruction.

source
LLVM.syncscope!Function
syncscope!(inst::AtomicInst, scope::SyncScope)

Set the synchronization scope of the given atomic instruction.

source

Call instructions

LLVM.callconvMethod
callconv(call_inst::Instruction)

Get the calling convention of the given callable instruction.

source
LLVM.callconv!Method
callconv!(call_inst::Instruction, cc)

Set the calling convention of the given callable instruction.

source
LLVM.istailcallFunction
istailcall(call_inst::Instruction)

Tests if this call site must be tail call optimized.

source
LLVM.tailcall!Function
tailcall!(call_inst::Instruction, is_tail::Bool)

Sets whether this call site must be tail call optimized.

source
LLVM.called_operandFunction
called_operand(call_inst::Instruction)

Get the operand of a callable instruction that represents the called function.

source
LLVM.argumentsFunction
arguments(call_inst::Instruction)

Get the arguments of a callable instruction.

source
LLVM.called_typeFunction
called_type(call_inst::Instruction)

Get the type of the function being called by the given callable instruction.

source

Operand Bundles

LLVM.operand_bundlesFunction
operand_bundles(call_inst::Instruction)

Get the operand bundles attached to the given call instruction.

source
LLVM.tagFunction
tag(bundle::OperandBundle)

Get the tag of the given operand bundle.

source
LLVM.inputsFunction
inputs(bundle::OperandBundle)

Get an iterator over the inputs of the given operand bundle.

source

Terminator instructions

LLVM.isterminatorFunction
isterminator(inst::Instruction)

Check if the given instruction is a terminator instruction.

source
LLVM.conditionFunction
condition(br::BrInst)

Get the condition of the given branch instruction.

source
LLVM.condition!Function
condition!(br::BrInst, cond::Value)

Set the condition of the given branch instruction.

source
LLVM.default_destFunction
default_dest(switch::SwitchInst)

Get the default destination of the given switch instruction.

source
LLVM.successorsMethod
successors(term::Instruction)

Get an iterator over the successors of the given terminator instruction.

This is a mutable iterator, so you can modify the successors of the terminator by calling setindex!.

source

Phi instructions

LLVM.incomingFunction
incoming(phi::PhiInst)

Get an iterator over the incoming values of the given phi node.

This is a mutable iterator, so you can modify the incoming values of the phi node by calling push! or append!, passing a tuple of the incoming value and the originating basic block.

source

Floating Point instructions

LLVM.fast_mathFunction
fast_math(inst::Instruction)

Get the fast math flags on an instruction.

source
LLVM.fast_math!Function
fast_math!(inst::Instruction; [flag=...], [all=...])

Set the fast math flags on an instruction. If all is true, then all flags are set.

The following flags are supported:

  • nnan: assume arguments and results are not NaN
  • ninf: assume arguments and results are not Inf
  • nsz: treat the sign of zero arguments and results as insignificant
  • arcp: allow use of reciprocal rather than perform division
  • contract: allow contraction of operations
  • afn: allow substitution of approximate calculations for functions
  • reassoc: allow reassociation of operations
source

Alignment

LLVM.alignmentFunction
alignment(val::LLVM.GlobalValue)

Get the alignment of the global value.

source
alignment(val::Instruction)

Get the alignment of the instruction.

source
LLVM.alignment!Function
alignment!(val::LLVM.GlobalValue, bytes::Integer)

Set the alignment of the global value.

source
alignment!(val::Instruction, bytes::Integer)

Set the alignment of the instruction.

source
+Instructions · LLVM.jl

Instructions

Base.copyMethod
copy(inst::Instruction)

Create a copy of the given instruction.

source
LLVM.remove!Method
remove!(inst::Instruction)

Remove the given instruction from the containing basic block, but do not delete the object.

source
LLVM.erase!Method
erase!(inst::Instruction)

Remove the given instruction from the containing basic block and delete the object.

Warning

This function is unsafe because it does not check if the instruction is used elsewhere.

source
LLVM.parentMethod
parent(inst::Instruction)

Get the basic block that contains the given instruction.

source

Creating instructions

LLVM.IRBuilderType
IRBuilder

An instruction builder, which is used to build instructions within a basic block.

source
LLVM.IRBuilderMethod
IRBuilder()

Create a new, unpositioned instruction builder.

This object needs to be disposed of using dispose.

source
LLVM.disposeMethod
dispose(builder::IRBuilder)

Dispose of an instruction builder.

source
LLVM.contextMethod
context(builder::IRBuilder)

Get the context associated with an instruction builder.

source
Base.positionFunction
position(builder::IRBuilder)

Return the current position of the instruction builder.

source
LLVM.position!Method
position!(builder::IRBuilder, inst::Instruction)

Position the instruction builder before the given instruction.

source
LLVM.position!Method
position!(builder::IRBuilder, bb::BasicBlock)

Position the instruction builder at the end of the given basic block.

source
LLVM.position!Method
position!(builder::IRBuilder)

Clear the current position of the instruction builder.

source
Base.insert!Method
insert!(builder::IRBuilder, inst::Instruction, [name::String])

Insert an instruction into the current basic block at the current position, optionally giving it a name.

source
LLVM.debuglocationFunction
debuglocation(builder::IRBuilder)

Get the current debug location of the instruction builder, or nothing if no location is set.

source
LLVM.debuglocation!Function
debuglocation!(builder::IRBuilder)

Clear the current debug location of the instruction builder.

source
debuglocation!(builder::IRBuilder, loc)

Set the current debug location of the instruction builder to loc, which can be a Metadata or MetadataAsValue.

source
debuglocation!(builder::IRBuilder, inst::Instruction)

Set the current debug location of the instruction builder to the location of the given instruction.

source

Comparison instructions

LLVM.predicateFunction
predicate(inst::ICmpInst)
+predicate(inst::FCmpInst)

Get the comparison predicate of the given integer or floating-point comparison instruction.

source

Atomic instructions

LLVM.is_atomicFunction
is_atomic(inst::Instruction)

Check if the given instruction is atomic. This includes atomic operations such as atomicrmw or fence, but also loads and stores that have been made atomic by setting an atomic ordering.

source
LLVM.orderingFunction
ordering(atomic_inst::Instruction)

Get the atomic ordering of the given atomic instruction.

source
LLVM.ordering!Function
ordering!(inst::Instruction, ordering::LLVM.AtomicOrdering)

Set the atomic ordering of the given instruction.

source
LLVM.syncscopeFunction
syncscope(inst::AtomicInst)

Get the synchronization scope of the given atomic instruction.

source
LLVM.syncscope!Function
syncscope!(inst::AtomicInst, scope::SyncScope)

Set the synchronization scope of the given atomic instruction.

source

Call instructions

LLVM.callconvMethod
callconv(call_inst::Instruction)

Get the calling convention of the given callable instruction.

source
LLVM.callconv!Method
callconv!(call_inst::Instruction, cc)

Set the calling convention of the given callable instruction.

source
LLVM.istailcallFunction
istailcall(call_inst::Instruction)

Tests if this call site must be tail call optimized.

source
LLVM.tailcall!Function
tailcall!(call_inst::Instruction, is_tail::Bool)

Sets whether this call site must be tail call optimized.

source
LLVM.called_operandFunction
called_operand(call_inst::Instruction)

Get the operand of a callable instruction that represents the called function.

source
LLVM.argumentsFunction
arguments(call_inst::Instruction)

Get the arguments of a callable instruction.

source
LLVM.called_typeFunction
called_type(call_inst::Instruction)

Get the type of the function being called by the given callable instruction.

source

Operand Bundles

LLVM.operand_bundlesFunction
operand_bundles(call_inst::Instruction)

Get the operand bundles attached to the given call instruction.

source
LLVM.tagFunction
tag(bundle::OperandBundle)

Get the tag of the given operand bundle.

source
LLVM.inputsFunction
inputs(bundle::OperandBundle)

Get an iterator over the inputs of the given operand bundle.

source

Terminator instructions

LLVM.isterminatorFunction
isterminator(inst::Instruction)

Check if the given instruction is a terminator instruction.

source
LLVM.conditionFunction
condition(br::BrInst)

Get the condition of the given branch instruction.

source
LLVM.condition!Function
condition!(br::BrInst, cond::Value)

Set the condition of the given branch instruction.

source
LLVM.default_destFunction
default_dest(switch::SwitchInst)

Get the default destination of the given switch instruction.

source
LLVM.successorsMethod
successors(term::Instruction)

Get an iterator over the successors of the given terminator instruction.

This is a mutable iterator, so you can modify the successors of the terminator by calling setindex!.

source

Phi instructions

LLVM.incomingFunction
incoming(phi::PhiInst)

Get an iterator over the incoming values of the given phi node.

This is a mutable iterator, so you can modify the incoming values of the phi node by calling push! or append!, passing a tuple of the incoming value and the originating basic block.

source

Floating Point instructions

LLVM.fast_mathFunction
fast_math(inst::Instruction)

Get the fast math flags on an instruction.

source
LLVM.fast_math!Function
fast_math!(inst::Instruction; [flag=...], [all=...])

Set the fast math flags on an instruction. If all is true, then all flags are set.

The following flags are supported:

  • nnan: assume arguments and results are not NaN
  • ninf: assume arguments and results are not Inf
  • nsz: treat the sign of zero arguments and results as insignificant
  • arcp: allow use of reciprocal rather than perform division
  • contract: allow contraction of operations
  • afn: allow substitution of approximate calculations for functions
  • reassoc: allow reassociation of operations
source

Alignment

LLVM.alignmentFunction
alignment(val::LLVM.GlobalValue)

Get the alignment of the global value.

source
alignment(val::Instruction)

Get the alignment of the instruction.

source
LLVM.alignment!Function
alignment!(val::LLVM.GlobalValue, bytes::Integer)

Set the alignment of the global value.

source
alignment!(val::Instruction, bytes::Integer)

Set the alignment of the instruction.

source
diff --git a/dev/lib/interop/index.html b/dev/lib/interop/index.html index 8e30652d..b895d425 100644 --- a/dev/lib/interop/index.html +++ b/dev/lib/interop/index.html @@ -1,4 +1,4 @@ -Julia integration · LLVM.jl

Julia integration

Essentials

LLVM.Interop.isghosttypeFunction
isghosttype(t::Type)
-isghosttype(T::LLVMType)

Check if a type is a ghost type, implying it would not be emitted by the Julia compiler. This only works for types created by the Julia compiler (living in its LLVM context).

source
LLVM.Interop.create_functionFunction
create_function(rettyp::LLVMType, argtyp::Vector{LLVMType}, [name::String])

Create an LLVM function, given its return type rettyp and a vector of argument types argtyp. The function is marked for inlining, to be embedded in the caller's body. Returns both the newly created function, and its type.

source
LLVM.Interop.call_functionFunction
call_function(f::LLVM.Function, rettyp::Type, argtyp::Type, args...)

Generate a call to an LLVM function f, given its return type rettyp and a tuple-type for the arguments. The arguments should be passed as a tuple expression containing the argument values (eg. :((1,2))), which will be splatted into the call to the function.

source

Calling inline assembly

LLVM.Interop.@asmcallMacro
@asmcall asm::String [constraints::String] [side_effects::Bool=false]
-         rettyp=Nothing argtyp=Tuple{} args...

Call some inline assembly asm, optionally constrained by constraints and denoting other side effects in side_effects, specifying the return type in rettyp and types of arguments as a tuple-type in argtyp.

source

LLVM pointer support

LLVM.Interop.@typed_ccallMacro
@typed_ccall(intrinsic, llvmcall, rettyp, (argtyps...), args...)

Perform a ccall while more accurately preserving argument types like LLVM expects them:

  • Bools are passed as i1, not i8;
  • Pointers (both Ptr and Core.LLVMPtr) are passed as typed pointers (instead of resp. i8* and i64);
  • Val-typed arguments will be passed as constants, if supported.

These features can be useful to call LLVM intrinsics, which may expect a specific set of argument types.

Note

This macro is not needed anymore on Julia 1.12, where the llvmcall ABI has been extended to preserve argument types more accurately.

source

LLVM intrinsics

LLVM.Interop.assumeFunction
assume(cond::Bool)

Assume that the condition cond is true. This is a hint to the compiler, possibly enabling it to optimize more aggressively.

source
+Julia integration · LLVM.jl

Julia integration

Essentials

LLVM.Interop.isghosttypeFunction
isghosttype(t::Type)
+isghosttype(T::LLVMType)

Check if a type is a ghost type, implying it would not be emitted by the Julia compiler. This only works for types created by the Julia compiler (living in its LLVM context).

source
LLVM.Interop.create_functionFunction
create_function(rettyp::LLVMType, argtyp::Vector{LLVMType}, [name::String])

Create an LLVM function, given its return type rettyp and a vector of argument types argtyp. The function is marked for inlining, to be embedded in the caller's body. Returns both the newly created function, and its type.

source
LLVM.Interop.call_functionFunction
call_function(f::LLVM.Function, rettyp::Type, argtyp::Type, args...)

Generate a call to an LLVM function f, given its return type rettyp and a tuple-type for the arguments. The arguments should be passed as a tuple expression containing the argument values (eg. :((1,2))), which will be splatted into the call to the function.

source

Calling inline assembly

LLVM.Interop.@asmcallMacro
@asmcall asm::String [constraints::String] [side_effects::Bool=false]
+         rettyp=Nothing argtyp=Tuple{} args...

Call some inline assembly asm, optionally constrained by constraints and denoting other side effects in side_effects, specifying the return type in rettyp and types of arguments as a tuple-type in argtyp.

source

LLVM pointer support

LLVM.Interop.@typed_ccallMacro
@typed_ccall(intrinsic, llvmcall, rettyp, (argtyps...), args...)

Perform a ccall while more accurately preserving argument types like LLVM expects them:

  • Bools are passed as i1, not i8;
  • Pointers (both Ptr and Core.LLVMPtr) are passed as typed pointers (instead of resp. i8* and i64);
  • Val-typed arguments will be passed as constants, if supported.

These features can be useful to call LLVM intrinsics, which may expect a specific set of argument types.

Note

This macro is not needed anymore on Julia 1.12, where the llvmcall ABI has been extended to preserve argument types more accurately.

source

LLVM intrinsics

LLVM.Interop.assumeFunction
assume(cond::Bool)

Assume that the condition cond is true. This is a hint to the compiler, possibly enabling it to optimize more aggressively.

source
diff --git a/dev/lib/metadata/index.html b/dev/lib/metadata/index.html index 8b41a4a9..7c7b7ea5 100644 --- a/dev/lib/metadata/index.html +++ b/dev/lib/metadata/index.html @@ -1,3 +1,3 @@ -Metadata · LLVM.jl

Metadata

LLVM.MDStringMethod
MDString(val::String)

Create a new string metadata node from the given Julia string.

source
Base.convertMethod
convert(String, md::MDString)

Get the string value of the given string metadata node.

source
LLVM.MDNodeType
MDNode

Abstract supertype for metadata nodes that can have operands.

See also: MDTuple for a concrete subtype.

source
LLVM.MDNodeMethod
MDNode(vals::Vector) -> MDTuple

Create a new tuple metadata node from the given operands.

Passing nothing as a value will result in a null operand.

source

Metadata <-> Value

LLVM.MetadataMethod
Metadata(val::Value)

Wrap the given value as metadata, for use in APIs that expect a LLVM.Metadata.

When the value is already metadata wrapped as a value, this will simply return the original metadata.

source
LLVM.ValueMethod
Value(md::Metadata)

Wrap the given metadata as a value, for use in APIs that expect a LLVM.Value.

When the metadata is already a value wrapped as metadata, this will simply return the original value.

source

Inspecting and attaching

LLVM.metadataMethod
metadata(inst::Instruction)
-metadata(inst::GlobalObject)

Iterate over the metadata of the given instruction or global object.

These iterators are mutable, and implement setindex! and delete! to modify the metadata.

source
LLVM.NamedMDNodeType
NamedMDNode

A named metadata node, which is a collection of metadata nodes with a name.

source
LLVM.metadataMethod
metadata(mod)

Fetch the module-level named metadata. This can be inspected using a Dict-like interface. Mutation is different: There is no setindex! method, as named metadata is append-only. Instead, fetch the named metadata node using getindex, and push! to it.

source
LLVM.nameMethod
name(node::NamedMDNode)

Get the name of the given named metadata node.

source
LLVM.operandsMethod
operands(node::NamedMDNode)

Get the operands of the given named metadata node.

source
Base.push!Method
push!(node::NamedMDNode, val::MDNode)

Add a metadata node to the given named metadata node.

source

Debug information

Location information

LLVM.lineMethod
line(location::DILocation)

Get the line number of this debug location.

source
LLVM.columnFunction
column(location::DILocation)

Get the column number of this debug location.

source
LLVM.scopeMethod
scope(location::DILocation)

Get the local scope associated with this debug location.

source
LLVM.inlined_atFunction
inlined_at(location::DILocation)

Get the "inline at" location associated with this debug location.

source

Variables

LLVM.fileMethod
file(var::DIVariable)

Get the file of the given variable.

source
LLVM.scopeMethod
name(var::DIVariable)

Get the name of the given variable.

source
LLVM.lineMethod
line(var::DIVariable)

Get the line number of the given variable.

source

Scopes

LLVM.DIScopeType
DIScope

Abstract supertype for lexical scopes and types (which are also declaration contexts).

source
LLVM.fileMethod
file(scope::DIScope)

Get the metadata of the file associated with a given scope.

source
LLVM.nameMethod
name(scope::DIScope)

Get the name of the given scope.

source

File

LLVM.sourceFunction
source(file::DIFile)

Get the source of the given file, or nothing if the source is not available.

source

Type

Base.sizeofMethod
sizeof(typ::DIType)

Get the size in bits of the given type.

source
LLVM.offsetMethod
offset(typ::DIType)

Get the offset in bits of the given type.

source
LLVM.lineMethod
line(typ::DIType)

Get the line number of the given type.

source

Subprogram

LLVM.lineMethod
line(subprogram::DISubProgram)

Get the line number of the given subprogram.

source

Compile Unit

Other

LLVM.subprogramMethod
subprogram(func::Function) -> DISubProgram

Get the subprogram of the given function, or nothing if the function has no subprogram.

source
LLVM.subprogram!Function
subprogram!(func::Function, sp::DISubProgram)

Set the subprogram of the given function.

source
+Metadata · LLVM.jl

Metadata

LLVM.MDStringMethod
MDString(val::String)

Create a new string metadata node from the given Julia string.

source
Base.convertMethod
convert(String, md::MDString)

Get the string value of the given string metadata node.

source
LLVM.MDNodeType
MDNode

Abstract supertype for metadata nodes that can have operands.

See also: MDTuple for a concrete subtype.

source
LLVM.MDNodeMethod
MDNode(vals::Vector) -> MDTuple

Create a new tuple metadata node from the given operands.

Passing nothing as a value will result in a null operand.

source

Metadata <-> Value

LLVM.MetadataMethod
Metadata(val::Value)

Wrap the given value as metadata, for use in APIs that expect a LLVM.Metadata.

When the value is already metadata wrapped as a value, this will simply return the original metadata.

source
LLVM.ValueMethod
Value(md::Metadata)

Wrap the given metadata as a value, for use in APIs that expect a LLVM.Value.

When the metadata is already a value wrapped as metadata, this will simply return the original value.

source

Inspecting and attaching

LLVM.metadataMethod
metadata(inst::Instruction)
+metadata(inst::GlobalObject)

Iterate over the metadata of the given instruction or global object.

These iterators are mutable, and implement setindex! and delete! to modify the metadata.

source
LLVM.NamedMDNodeType
NamedMDNode

A named metadata node, which is a collection of metadata nodes with a name.

source
LLVM.metadataMethod
metadata(mod)

Fetch the module-level named metadata. This can be inspected using a Dict-like interface. Mutation is different: There is no setindex! method, as named metadata is append-only. Instead, fetch the named metadata node using getindex, and push! to it.

source
LLVM.nameMethod
name(node::NamedMDNode)

Get the name of the given named metadata node.

source
LLVM.operandsMethod
operands(node::NamedMDNode)

Get the operands of the given named metadata node.

source
Base.push!Method
push!(node::NamedMDNode, val::MDNode)

Add a metadata node to the given named metadata node.

source

Debug information

Location information

LLVM.lineMethod
line(location::DILocation)

Get the line number of this debug location.

source
LLVM.columnFunction
column(location::DILocation)

Get the column number of this debug location.

source
LLVM.scopeMethod
scope(location::DILocation)

Get the local scope associated with this debug location.

source
LLVM.inlined_atFunction
inlined_at(location::DILocation)

Get the "inline at" location associated with this debug location.

source

Variables

LLVM.fileMethod
file(var::DIVariable)

Get the file of the given variable.

source
LLVM.scopeMethod
name(var::DIVariable)

Get the name of the given variable.

source
LLVM.lineMethod
line(var::DIVariable)

Get the line number of the given variable.

source

Scopes

LLVM.DIScopeType
DIScope

Abstract supertype for lexical scopes and types (which are also declaration contexts).

source
LLVM.fileMethod
file(scope::DIScope)

Get the metadata of the file associated with a given scope.

source
LLVM.nameMethod
name(scope::DIScope)

Get the name of the given scope.

source

File

LLVM.sourceFunction
source(file::DIFile)

Get the source of the given file, or nothing if the source is not available.

source

Type

Base.sizeofMethod
sizeof(typ::DIType)

Get the size in bits of the given type.

source
LLVM.offsetMethod
offset(typ::DIType)

Get the offset in bits of the given type.

source
LLVM.lineMethod
line(typ::DIType)

Get the line number of the given type.

source

Subprogram

LLVM.lineMethod
line(subprogram::DISubProgram)

Get the line number of the given subprogram.

source

Compile Unit

Other

LLVM.subprogramMethod
subprogram(func::Function) -> DISubProgram

Get the subprogram of the given function, or nothing if the function has no subprogram.

source
LLVM.subprogram!Function
subprogram!(func::Function, sp::DISubProgram)

Set the subprogram of the given function.

source
diff --git a/dev/lib/modules/index.html b/dev/lib/modules/index.html index f3f6cf59..460dcd78 100644 --- a/dev/lib/modules/index.html +++ b/dev/lib/modules/index.html @@ -1,2 +1,2 @@ -Modules · LLVM.jl

Modules

LLVM.ModuleType
LLVM.Module

Modules are the top level container of all other LLVM IR objects. Each module directly contains a list of globals variables, a list of functions, a list of libraries (or other modules) this module depends on, a symbol table, and various data about the target's characteristics.

source
Base.copyMethod
copy(mod::LLVM.Module)

Clone the given module.

This object needs to be disposed of using dispose.

source
LLVM.disposeMethod
dispose(mod::LLVM.Module)

Dispose of the given module, releasing all resources associated with it. The module should not be used after this operation.

source

Properties and operations

LLVM.contextMethod
context(mod::LLVM.Module)

Get the context in which the given module was created.

source
LLVM.nameMethod
name(mod::LLVM.Module)

Get the name of the given module.

source
LLVM.name!Method
name!(mod::LLVM.Module, name::String)

Set the name of the given module.

source
LLVM.tripleMethod
triple(mod::LLVM.Module)

Get the target triple of the given module.

source
LLVM.triple!Method
triple!(mod::LLVM.Module, triple::String)

Set the target triple of the given module.

source
LLVM.datalayout!Function
datalayout!(mod::LLVM.Module, layout)

Set the data layout of the given module. The layout can be a string or a DataLayout object.

source
LLVM.inline_asm!Function
inline_asm!(mod::LLVM.Module, asm::String; overwrite::Bool=false)

Add module-level inline assembly to the given module. If overwrite is true, the existing inline assembly is replaced, otherwise the new assembly is appended.

source
LLVM.inline_asmFunction
inline_asm(mod::LLVM.Module) -> String

Get the module-level inline assembly of the given module.

source
LLVM.sdk_versionFunction
sdk_version!(mod::LLVM.Module, version::VersionNumber)

Set the SDK version of the given module.

source
LLVM.sdk_version!Function
sdk_version(mod::LLVM.Module)

Get the SDK version of the given module, if it has been set.

source
LLVM.set_used!Function
set_used!(mod::LLVM.Module, values::GlobalVariable...)

Mark the given global variables as used in the given module by appending them to the llvm.used metadata node.

source
LLVM.set_compiler_used!Function
set_compiler_used!(mod::LLVM.Module, values::GlobalVariable...)

Mark the given global variables as used by the compiler in the given module by appending them to the llvm.compiler.used metadata node. As opposed to set_used!, this still allows the linker to remove the variable if it is not actually used.

source

Textual representation

Base.parseMethod
parse(::Type{Module}, ir::String)

Parse the given LLVM IR string into a module.

source

Binary representation ("bitcode")

Base.parseMethod
parse(::Type{Module}, membuf::MemoryBuffer)

Parse bitcode from the given memory buffer into a module.

source
Base.parseMethod
parse(::Type{Module}, data::Vector)

Parse bitcode from the given byte vector into a module.

source
Base.convertMethod
convert(::Type{MemoryBuffer}, mod::Module)

Convert the given module to a memory buffer containing its bitcode.

source
Base.convertMethod
convert(::Type{Vector}, mod::Module)

Convert the given module to a byte vector containing its bitcode.

source
Base.writeMethod
write(io::IO, mod::Module)

Write bitcode of the given module to the given IO stream.

source

Contents

LLVM.globalsFunction
globals(mod::LLVM.Module)

Get an iterator over the global variables in the given module.

source
LLVM.prevglobalFunction
prevglobal(gv::LLVM.GlobalVariable)

Get the previous global variable in the module, or nothing if there is none.

See also: nextglobal.

source
LLVM.nextglobalFunction
nextglobal(gv::LLVM.GlobalVariable)

Get the next global variable in the module, or nothing if there is none.

See also: prevglobal.

source
LLVM.functionsMethod
functions(mod::LLVM.Module)

Get an iterator over the functions in the given module.

source
LLVM.prevfunFunction
prevfun(fun::LLVM.Function)

Get the previous function in the module, or nothing if there is none.

source
LLVM.nextfunFunction
nextfun(fun::LLVM.Function)

Get the next function in the module, or nothing if there is none.

source
LLVM.flagsMethod
flags(mod::LLVM.Module)

Get a dictionary-like object representing the module flags of the given module.

This object can be used to get and set module flags, by calling getindex and setindex!.

source

Linking

LLVM.link!Method
link!(dst::Module, src::Module)

Link the source module src into the destination module dst. The source module is destroyed in the process.

source
+Modules · LLVM.jl

Modules

LLVM.ModuleType
LLVM.Module

Modules are the top level container of all other LLVM IR objects. Each module directly contains a list of globals variables, a list of functions, a list of libraries (or other modules) this module depends on, a symbol table, and various data about the target's characteristics.

source
Base.copyMethod
copy(mod::LLVM.Module)

Clone the given module.

This object needs to be disposed of using dispose.

source
LLVM.disposeMethod
dispose(mod::LLVM.Module)

Dispose of the given module, releasing all resources associated with it. The module should not be used after this operation.

source

Properties and operations

LLVM.contextMethod
context(mod::LLVM.Module)

Get the context in which the given module was created.

source
LLVM.nameMethod
name(mod::LLVM.Module)

Get the name of the given module.

source
LLVM.name!Method
name!(mod::LLVM.Module, name::String)

Set the name of the given module.

source
LLVM.tripleMethod
triple(mod::LLVM.Module)

Get the target triple of the given module.

source
LLVM.triple!Method
triple!(mod::LLVM.Module, triple::String)

Set the target triple of the given module.

source
LLVM.datalayout!Function
datalayout!(mod::LLVM.Module, layout)

Set the data layout of the given module. The layout can be a string or a DataLayout object.

source
LLVM.inline_asm!Function
inline_asm!(mod::LLVM.Module, asm::String; overwrite::Bool=false)

Add module-level inline assembly to the given module. If overwrite is true, the existing inline assembly is replaced, otherwise the new assembly is appended.

source
LLVM.inline_asmFunction
inline_asm(mod::LLVM.Module) -> String

Get the module-level inline assembly of the given module.

source
LLVM.sdk_versionFunction
sdk_version!(mod::LLVM.Module, version::VersionNumber)

Set the SDK version of the given module.

source
LLVM.sdk_version!Function
sdk_version(mod::LLVM.Module)

Get the SDK version of the given module, if it has been set.

source
LLVM.set_used!Function
set_used!(mod::LLVM.Module, values::GlobalVariable...)

Mark the given global variables as used in the given module by appending them to the llvm.used metadata node.

source
LLVM.set_compiler_used!Function
set_compiler_used!(mod::LLVM.Module, values::GlobalVariable...)

Mark the given global variables as used by the compiler in the given module by appending them to the llvm.compiler.used metadata node. As opposed to set_used!, this still allows the linker to remove the variable if it is not actually used.

source

Textual representation

Base.parseMethod
parse(::Type{Module}, ir::String)

Parse the given LLVM IR string into a module.

source

Binary representation ("bitcode")

Base.parseMethod
parse(::Type{Module}, membuf::MemoryBuffer)

Parse bitcode from the given memory buffer into a module.

source
Base.parseMethod
parse(::Type{Module}, data::Vector)

Parse bitcode from the given byte vector into a module.

source
Base.convertMethod
convert(::Type{MemoryBuffer}, mod::Module)

Convert the given module to a memory buffer containing its bitcode.

source
Base.convertMethod
convert(::Type{Vector}, mod::Module)

Convert the given module to a byte vector containing its bitcode.

source
Base.writeMethod
write(io::IO, mod::Module)

Write bitcode of the given module to the given IO stream.

source

Contents

LLVM.globalsFunction
globals(mod::LLVM.Module)

Get an iterator over the global variables in the given module.

source
LLVM.prevglobalFunction
prevglobal(gv::LLVM.GlobalVariable)

Get the previous global variable in the module, or nothing if there is none.

See also: nextglobal.

source
LLVM.nextglobalFunction
nextglobal(gv::LLVM.GlobalVariable)

Get the next global variable in the module, or nothing if there is none.

See also: prevglobal.

source
LLVM.functionsMethod
functions(mod::LLVM.Module)

Get an iterator over the functions in the given module.

source
LLVM.prevfunFunction
prevfun(fun::LLVM.Function)

Get the previous function in the module, or nothing if there is none.

source
LLVM.nextfunFunction
nextfun(fun::LLVM.Function)

Get the next function in the module, or nothing if there is none.

source
LLVM.flagsMethod
flags(mod::LLVM.Module)

Get a dictionary-like object representing the module flags of the given module.

This object can be used to get and set module flags, by calling getindex and setindex!.

source

Linking

LLVM.link!Method
link!(dst::Module, src::Module)

Link the source module src into the destination module dst. The source module is destroyed in the process.

source
diff --git a/dev/lib/transforms/index.html b/dev/lib/transforms/index.html index 89eca2da..0b5321e2 100644 --- a/dev/lib/transforms/index.html +++ b/dev/lib/transforms/index.html @@ -6,16 +6,16 @@ add!(fpm, SomeFunctionPass()) end run!(pb, mod, tm) -end

For quickly running a simple pass or pipeline, a shorthand run! method is provided that obviates the construction of a NewPMPassBuilder:

run!("some-pass", mod, tm; verify_each=true)

See also: register!, add!, run!

source
LLVM.run!Function
run!(pb::NewPMPassBuilder, mod::Module, [tm::TargetMachine])
-run!(pipeline::String, mod::Module, [tm::TargetMachine])

Run passes on a module. The passes are specified by a pass builder or a string that represents a pass pipeline. The target machine is used to optimize the passes.

source

Pass managers

LLVM.NewPMPassManagerType
NewPMModulePassManager()
+end

For quickly running a simple pass or pipeline, a shorthand run! method is provided that obviates the construction of a NewPMPassBuilder:

run!("some-pass", mod, tm; verify_each=true)

See also: register!, add!, run!

source
LLVM.run!Function
run!(pb::NewPMPassBuilder, mod::Module, [tm::TargetMachine])
+run!(pipeline::String, mod::Module, [tm::TargetMachine])

Run passes on a module. The passes are specified by a pass builder or a string that represents a pass pipeline. The target machine is used to optimize the passes.

source

Pass managers

LLVM.NewPMPassManagerType
NewPMModulePassManager()
 NewPMCGSCCPassManager()
 NewPMFunctionPassManager()
 NewPMLoopPassManager(; use_memory_ssa=false)
 NewPMAAManager()

Create a new pass manager of the specified type. These objects can be used to construct pass pipelines, by add!ing passes to them, and finally add!ing them to a parent pass manager or pass builder.

Creating a pass manager and adding it to a parent manager or builder can be shortened using a single add!:

add!(parent, NewPMModulePassManager()) do mpm
     add!(mpm, SomeModulePass())
-end

See also: add!, NewPMPassBuilder

source
LLVM.add!Function
add!(pm::AbstractPassManager, pass)

Adds a pass or pipeline to a pass builder or pass manager.

The pass or pipeline should be a string or string-convertible object known by LLVM. These can be constructed by using pass constructors, e.g., InternalizePass(), or by manually specifying names like default<O3>.

When using custom passes, remember that they need to be registered with the pass builder before they can be used.

See also: register!

source

Alias analyses

Custom passes

LLVM.NewPMCustomPassType
NewPMModulePass(name, callback)
-NewPMFunctionPass(name, callback)

Create a new custom pass. The name is a string that will be used to identify the pass in the pass manager. The callback is a function that will be called when the pass is run. The function should take a single argument, the module or function to be processed, and return a boolean indicating whether the pass made any changes.

Before using a custom pass, it must be registered with a pass builder using register!.

See also: register!

source
LLVM.register!Function
register!(pb, custom_pass)

Register a custom pass with the pass builder. This is necessary before the pass can be used in a pass pipeline.

See also: NewPMModulePass, NewPMFunctionPass

source

IR cloning

LLVM.clone_into!Function
clone_into!(new::LLVM.Function, old::LLVM.Function; [suffix::String],
+end

See also: add!, NewPMPassBuilder

source
LLVM.add!Function
add!(pm::AbstractPassManager, pass)

Adds a pass or pipeline to a pass builder or pass manager.

The pass or pipeline should be a string or string-convertible object known by LLVM. These can be constructed by using pass constructors, e.g., InternalizePass(), or by manually specifying names like default<O3>.

When using custom passes, remember that they need to be registered with the pass builder before they can be used.

See also: register!

source

Alias analyses

Custom passes

LLVM.NewPMCustomPassType
NewPMModulePass(name, callback)
+NewPMFunctionPass(name, callback)

Create a new custom pass. The name is a string that will be used to identify the pass in the pass manager. The callback is a function that will be called when the pass is run. The function should take a single argument, the module or function to be processed, and return a boolean indicating whether the pass made any changes.

Before using a custom pass, it must be registered with a pass builder using register!.

See also: register!

source
LLVM.register!Function
register!(pb, custom_pass)

Register a custom pass with the pass builder. This is necessary before the pass can be used in a pass pipeline.

See also: NewPMModulePass, NewPMFunctionPass

source

IR cloning

LLVM.clone_into!Function
clone_into!(new::LLVM.Function, old::LLVM.Function; [suffix::String],
             [value_map::Dict{<:Value,<:Value}],
             [changes::LLVM.LLVMCloneFunctionChangeType],
             [type_mapper::Function],
-            [materializer::Function])

Clone the contents of a function old into a new function new. The value_map dictionary can be used to remap values from the old function to the new function, while suffix appends a suffix to all values cloned. The type_mapper and materializer functions can be used to respectively map types and materialize values on demand.

The changes argument determines how this function behaves; refer to the LLVM documentation of CloneFunctionInto for more details.

source
LLVM.cloneFunction
clone(f::Function; [value_map::Dict{Value,Value}])

Simpler version of clone_into! that clones a function f into a new function, optionally mapping values according to the value_map dictionary.

source
clone(bb::BasicBlock]; dest=parent(bb), [suffix::String], [value_map::Dict{Value,Value}])

Clone a basic block bb by copying all instructions. The new block is inserted at the end of the parent function; this can be altered by setting dest to a different function, or to nothing to create a detached block. The suffix is appended to the name of the cloned basic block.

Warn

This function only remaps values that are defined in the cloned basic block. Values defined outside the basic block (e.g. function arguments) are not remapped by default. This means that the cloned basic block can generally only be used within the same function that it was cloned from, unless you manually remap other values. This can be done passing a value_map dictionary.

source
+ [materializer::Function])

Clone the contents of a function old into a new function new. The value_map dictionary can be used to remap values from the old function to the new function, while suffix appends a suffix to all values cloned. The type_mapper and materializer functions can be used to respectively map types and materialize values on demand.

The changes argument determines how this function behaves; refer to the LLVM documentation of CloneFunctionInto for more details.

source
LLVM.cloneFunction
clone(f::Function; [value_map::Dict{Value,Value}])

Simpler version of clone_into! that clones a function f into a new function, optionally mapping values according to the value_map dictionary.

source
clone(bb::BasicBlock]; dest=parent(bb), [suffix::String], [value_map::Dict{Value,Value}])

Clone a basic block bb by copying all instructions. The new block is inserted at the end of the parent function; this can be altered by setting dest to a different function, or to nothing to create a detached block. The suffix is appended to the name of the cloned basic block.

Warn

This function only remaps values that are defined in the cloned basic block. Values defined outside the basic block (e.g. function arguments) are not remapped by default. This means that the cloned basic block can generally only be used within the same function that it was cloned from, unless you manually remap other values. This can be done passing a value_map dictionary.

source
diff --git a/dev/lib/types/index.html b/dev/lib/types/index.html index 3982e138..8d8304c0 100644 --- a/dev/lib/types/index.html +++ b/dev/lib/types/index.html @@ -1,2 +1,2 @@ -Types · LLVM.jl

Types

LLVM.issizedFunction
issized(typ::LLVMType)

Return true if it makes sense to take the size of this type.

Note that this does not mean that it's possible to call sizeof on this type, as LLVM types sizes can only queried given a target data layout.

See also: sizeof(::DataLayout, ::LLVMType).

source
LLVM.contextMethod
context(typ::LLVMType)

Returns the context in which the given type was created.

source
Base.eltypeMethod
eltype(typ::LLVMType)

Get the element type of the given type, if supported.

source

Integer types

LLVM.IntTypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.widthFunction
width(inttyp::LLVM.IntegerType)

Get the bit width of the given integer type.

source

Floating-point types

LLVM.FP128TypeFunction
LLVM.FP128Type()

Create a 128-bit floating-point type, with a 113-bit significand.

source
LLVM.PPCFP128TypeFunction
LLVM.PPCFP128Type()

Create a 128-bit floating-point type, consisting of two 64-bits.

source

Function types

LLVM.isvarargFunction
isvararg(ft::LLVM.FunctionType)

Check whether the given function type is variadic.

source
LLVM.return_typeFunction
return_type(ft::LLVM.FunctionType)

Get the return type of the given function type.

source
LLVM.parametersMethod
parameters(ft::LLVM.FunctionType)

Get the parameter types of the given function type.

source

Pointer types

LLVM.addrspaceFunction
addrspace(ptrtyp::LLVM.PointerType)

Get the address space of the given pointer type.

source
LLVM.is_opaqueFunction
is_opaque(ptrtyp::LLVM.PointerType)

Check whether the given pointer type is opaque.

source

Array types

LLVM.ArrayTypeType
LLVM.ArrayType <: LLVMType

An array type, representing a fixed-size array of identically-typed elements.

source
Base.lengthMethod
length(arrtyp::LLVM.ArrayType)

Get the length of the given array type.

source
Base.isemptyMethod
isempty(arrtyp::LLVM.ArrayType)

Check whether the given array type is empty.

source

Vector types

LLVM.VectorTypeType
LLVM.VectorType <: LLVMType

A vector type, representing a fixed-size vector of identically-typed elements. Typically used for SIMD operations.

source
Base.lengthMethod
length(vectyp::LLVM.VectorType)

Get the length of the given vector type.

source

Structure types

LLVM.StructTypeType
LLVM.StructType <: LLVMType

A structure type, representing a collection of named fields of potentially different types.

source
LLVM.nameMethod
name(structtyp::StructType)

Get the name of the given structure type.

source
LLVM.ispackedFunction
ispacked(structtyp::LLVM.StructType)

Check whether the given structure type is packed.

source
LLVM.isopaqueFunction
isopaque(structtyp::LLVM.StructType)

Check whether the given structure type is opaque.

source
LLVM.elements!Function
elements!(structtyp::LLVM.StructType, elems::LLVMType[]; packed=false)

Set the elements of the given structure type to elems. The packed argument indicates whether the structure should be packed, i.e., without padding between fields.

See also: elements.

source

Other types

LLVM.VoidTypeType
LLVM.VoidType <: LLVMType

A void type, representing the absence of a value.

source

Type iteration

LLVM.typesFunction
types(ctx::LLVM.Context)

Get a dictionary of all types in the given context.

source
+Types · LLVM.jl

Types

LLVM.issizedFunction
issized(typ::LLVMType)

Return true if it makes sense to take the size of this type.

Note that this does not mean that it's possible to call sizeof on this type, as LLVM types sizes can only queried given a target data layout.

See also: sizeof(::DataLayout, ::LLVMType).

source
LLVM.contextMethod
context(typ::LLVMType)

Returns the context in which the given type was created.

source
Base.eltypeMethod
eltype(typ::LLVMType)

Get the element type of the given type, if supported.

source

Integer types

LLVM.IntTypeFunction
LLVM.IntType(bits::Integer)

Create an integer type with the given bits width.

Short-hand constructors are available for common widths: LLVM.Int1Type, LLVM.Int8Type, LLVM.Int16Type, LLVM.Int32Type, LLVM.Int64Type, and LLVM.Int128Type.

source
LLVM.widthFunction
width(inttyp::LLVM.IntegerType)

Get the bit width of the given integer type.

source

Floating-point types

LLVM.FP128TypeFunction
LLVM.FP128Type()

Create a 128-bit floating-point type, with a 113-bit significand.

source
LLVM.PPCFP128TypeFunction
LLVM.PPCFP128Type()

Create a 128-bit floating-point type, consisting of two 64-bits.

source

Function types

LLVM.isvarargFunction
isvararg(ft::LLVM.FunctionType)

Check whether the given function type is variadic.

source
LLVM.return_typeFunction
return_type(ft::LLVM.FunctionType)

Get the return type of the given function type.

source
LLVM.parametersMethod
parameters(ft::LLVM.FunctionType)

Get the parameter types of the given function type.

source

Pointer types

LLVM.addrspaceFunction
addrspace(ptrtyp::LLVM.PointerType)

Get the address space of the given pointer type.

source
LLVM.is_opaqueFunction
is_opaque(ptrtyp::LLVM.PointerType)

Check whether the given pointer type is opaque.

source

Array types

LLVM.ArrayTypeType
LLVM.ArrayType <: LLVMType

An array type, representing a fixed-size array of identically-typed elements.

source
Base.lengthMethod
length(arrtyp::LLVM.ArrayType)

Get the length of the given array type.

source
Base.isemptyMethod
isempty(arrtyp::LLVM.ArrayType)

Check whether the given array type is empty.

source

Vector types

LLVM.VectorTypeType
LLVM.VectorType <: LLVMType

A vector type, representing a fixed-size vector of identically-typed elements. Typically used for SIMD operations.

source
Base.lengthMethod
length(vectyp::LLVM.VectorType)

Get the length of the given vector type.

source

Structure types

LLVM.StructTypeType
LLVM.StructType <: LLVMType

A structure type, representing a collection of named fields of potentially different types.

source
LLVM.nameMethod
name(structtyp::StructType)

Get the name of the given structure type.

source
LLVM.ispackedFunction
ispacked(structtyp::LLVM.StructType)

Check whether the given structure type is packed.

source
LLVM.isopaqueFunction
isopaque(structtyp::LLVM.StructType)

Check whether the given structure type is opaque.

source
LLVM.elements!Function
elements!(structtyp::LLVM.StructType, elems::LLVMType[]; packed=false)

Set the elements of the given structure type to elems. The packed argument indicates whether the structure should be packed, i.e., without padding between fields.

See also: elements.

source

Other types

LLVM.VoidTypeType
LLVM.VoidType <: LLVMType

A void type, representing the absence of a value.

source

Type iteration

LLVM.typesFunction
types(ctx::LLVM.Context)

Get a dictionary of all types in the given context.

source
diff --git a/dev/lib/values/index.html b/dev/lib/values/index.html index 70e354c8..bba2e0c7 100644 --- a/dev/lib/values/index.html +++ b/dev/lib/values/index.html @@ -1,2 +1,2 @@ -Values · LLVM.jl

Values

General APIs

LLVM.contextMethod
context(val::LLVM.Value)

Return the context in which the given value was created.

source
LLVM.name!Method
name!(val::Value, name::String)

Set the name of the given value.

source
LLVM.isundefFunction
isundef(val::LLVM.Value)

Check if the given value is an undef value.

source
LLVM.ispoisonFunction
ispoison(val::LLVM.Value)

Check if the given value is a poison value.

source
LLVM.isnullFunction
isnull(val::LLVM.Value)

Check if the given value is a null constant.

source

User values

LLVM.operandsMethod
operands(user::LLVM.User)

Get an iterator over the operands of the given user.

source

Constant values

LLVM.ConstantType
LLVM.Constant <: LLVM.User

Abstract supertype for all constant values.

source
LLVM.nullFunction
null(typ::LLVMType)

Create a null constant of the given type.

source
LLVM.all_onesFunction
all_ones(typ::LLVMType)

Create a constant with all bits set to one of the given type.

source
Base.convertMethod
convert(::Type{<:Integer}, val::ConstantInt)

Convert a constant integer value back to a Julia integer.

source
Base.convertMethod
convert(::Type{<:AbstractFloat}, val::ConstantFP)

Convert a constant floating point value back to a Julia floating point number.

source
LLVM.ConstantDataArrayType
ConstantDataArray <: LLVM.ConstantDataSequential

A constant array of simple data values, i.e., whose element type is a simple 1/2/4/8-byte integer or half/bfloat/float/double, and whose elements are just simple data values

See also: ConstantArray

source
LLVM.ConstantDataArrayMethod
ConstantDataArray(typ::LLVMType, data::AbstractVector)

Create a constant array of simple data values of the given type and data.

Warning

The memory layout of the data array must match the expected layout of the LLVM type.

source
LLVM.ConstantDataArrayMethod
ConstantDataArray(data::AbstractVector)

Create a constant array of simple data values from a Julia vector.

source
LLVM.ConstantDataVectorType
ConstantDataVector <: LLVM.ConstantDataSequential

A constant vector of simple data values, i.e., whose element type is a simple 1/2/4/8-byte integer or half/bfloat/float/double, and whose elements are just simple data values

source
LLVM.ConstantArrayType
ConstantArray <: LLVM.ConstantAggregate

A constant array of values.

This type implements the Julia array interface, so (to some extent) it can be used as a regular Julia array.

source
LLVM.ConstantArrayMethod
ConstantArray(typ::LLVMType, data::AbstractArray)

Create a constant array of values of the given type and data.

Note

When using simple data types, this constructor can also return a ConstantDataArray.

source
LLVM.ConstantArrayMethod
ConstantArray(data::AbstractArray)

Create a constant array of values from a Julia array, using the appropriate constant type.

source
Base.collectMethod
collect(ca::ConstantArray)

Convert a constant array back to a Julia array.

source
LLVM.ConstantExprType
LLVM.ConstantExpr <: LLVM.Constant

A constant value that is initialized with an expression using other constant values.

Constant expressions are created using const_-prefixed functions, which correspond to the LLVM IR instructions: const_neg, const_not, etc.

source

Global values

LLVM.global_value_typeFunction
global_value_type(val::LLVM.GlobalValue)

Get the type of the global value.

This differs from value_type in that it returns the type of the contained value, not the type of the global value itself which is always a pointer type.

source
LLVM.parentMethod
parent(val::LLVM.GlobalValue)

Get the parent module of the global value.

source
LLVM.isdeclarationFunction
isdeclaration(val::LLVM.GlobalValue)

Check if the global value is a declaration, i.e. it does not have a definition.

source
LLVM.linkageFunction
linkage(val::LLVM.GlobalValue)

Get the linkage of the global value.

source
LLVM.linkage!Function
linkage!(val::LLVM.GlobalValue, linkage::LLVM.LLVMLinkage)

Set the linkage of the global value.

source
LLVM.sectionFunction
section(val::LLVM.GlobalValue)

Get the section of the global value.

source
LLVM.section!Function
section!(val::LLVM.GlobalValue, sec::String)

Set the section of the global value.

source
LLVM.visibilityFunction
visibility(val::LLVM.GlobalValue)

Get the visibility of the global value.

source
LLVM.visibility!Function
visibility!(val::LLVM.GlobalValue, viz::LLVM.LLVMVisibility)

Set the visibility of the global value.

source
LLVM.dllstorageFunction
dllstorage(val::LLVM.GlobalValue)

Get the DLL storage class of the global value.

source
LLVM.dllstorage!Function
dllstorage!(val::LLVM.GlobalValue, storage::LLVM.LLVMDLLStorageClass)

Set the DLL storage class of the global value.

source
LLVM.unnamed_addrFunction
unnamed_addr(val::LLVM.GlobalValue)

Check if the global value has the unnamed address flag set.

source
LLVM.unnamed_addr!Function
unnamed_addr!(val::LLVM.GlobalValue, flag::Bool)

Set the unnamed address flag of the global value.

source
LLVM.alignmentMethod
alignment(val::LLVM.GlobalValue)

Get the alignment of the global value.

source
LLVM.alignment!Method
alignment!(val::LLVM.GlobalValue, bytes::Integer)

Set the alignment of the global value.

source

Global variables

Global variables are a specific kind of global values, and have additional APIs:

LLVM.erase!Method
erase!(gv::GlobalVariable)

Remove the global variable from its parent module and delete it.

Warning

This function is unsafe as it does not check if the global variable is still used elsewhere.

source
LLVM.initializer!Function
initializer!(gv::GlobalVariable, val::Constant)

Set the initializer of the global variable. Setting the value to nothing removes the current initializer.

source
LLVM.threadlocal!Function
threadlocal!(gv::GlobalVariable, flag::Bool)

Set the thread-local flag of the global variable.

source
LLVM.threadlocalmode!Function
threadlocalmode!(gv::GlobalVariable, mode::LLVM.LLVMThreadLocalMode)

Set the thread-local mode of the global variable.

source
LLVM.isconstantMethod
isconstant(gv::GlobalVariable)

Check if the global variable is a global constant, i.e., its value is immutable throughout the runtime execution of the program.

source
LLVM.constant!Function
constant!(gv::GlobalVariable, flag::Bool)

Set the constant flag of the global variable.

source
LLVM.isextinitFunction
isextinit(gv::GlobalVariable)

Check if the global variable is externally initialized.

source
LLVM.extinit!Function
extinit!(gv::GlobalVariable, flag::Bool)

Set the externally initialized flag of the global variable.

source

Uses

LLVM.replace_uses!Function
replace_uses!(old::LLVM.Value, new::LLVM.Value)

Replace all uses of an old value in the IR with new.

This does not replace uses in metadata, which must be done separately with replace_metadata_uses!.

source
LLVM.usesFunction
uses(val::LLVM.Value)

Get an iterator over the uses of the given value.

See also: LLVM.Use.

source
LLVM.UseType
LLVM.Use

A use of a value in the IR. Knows both the user and the used value.

See also: user, value.

source
LLVM.userFunction
user(use::LLVM.Use)

Get the user of the given use.

source
LLVM.valueFunction
value(use::LLVM.Use)

Get the used value of the given use.

source
+Values · LLVM.jl

Values

General APIs

LLVM.contextMethod
context(val::LLVM.Value)

Return the context in which the given value was created.

source
LLVM.name!Method
name!(val::Value, name::String)

Set the name of the given value.

source
LLVM.isundefFunction
isundef(val::LLVM.Value)

Check if the given value is an undef value.

source
LLVM.ispoisonFunction
ispoison(val::LLVM.Value)

Check if the given value is a poison value.

source
LLVM.isnullFunction
isnull(val::LLVM.Value)

Check if the given value is a null constant.

source

User values

LLVM.operandsMethod
operands(user::LLVM.User)

Get an iterator over the operands of the given user.

source

Constant values

LLVM.ConstantType
LLVM.Constant <: LLVM.User

Abstract supertype for all constant values.

source
LLVM.nullFunction
null(typ::LLVMType)

Create a null constant of the given type.

source
LLVM.all_onesFunction
all_ones(typ::LLVMType)

Create a constant with all bits set to one of the given type.

source
Base.convertMethod
convert(::Type{<:Integer}, val::ConstantInt)

Convert a constant integer value back to a Julia integer.

source
Base.convertMethod
convert(::Type{<:AbstractFloat}, val::ConstantFP)

Convert a constant floating point value back to a Julia floating point number.

source
LLVM.ConstantDataArrayType
ConstantDataArray <: LLVM.ConstantDataSequential

A constant array of simple data values, i.e., whose element type is a simple 1/2/4/8-byte integer or half/bfloat/float/double, and whose elements are just simple data values

See also: ConstantArray

source
LLVM.ConstantDataArrayMethod
ConstantDataArray(typ::LLVMType, data::AbstractVector)

Create a constant array of simple data values of the given type and data.

Warning

The memory layout of the data array must match the expected layout of the LLVM type.

source
LLVM.ConstantDataArrayMethod
ConstantDataArray(data::AbstractVector)

Create a constant array of simple data values from a Julia vector.

source
LLVM.ConstantDataVectorType
ConstantDataVector <: LLVM.ConstantDataSequential

A constant vector of simple data values, i.e., whose element type is a simple 1/2/4/8-byte integer or half/bfloat/float/double, and whose elements are just simple data values

source
LLVM.ConstantArrayType
ConstantArray <: LLVM.ConstantAggregate

A constant array of values.

This type implements the Julia array interface, so (to some extent) it can be used as a regular Julia array.

source
LLVM.ConstantArrayMethod
ConstantArray(typ::LLVMType, data::AbstractArray)

Create a constant array of values of the given type and data.

Note

When using simple data types, this constructor can also return a ConstantDataArray.

source
LLVM.ConstantArrayMethod
ConstantArray(data::AbstractArray)

Create a constant array of values from a Julia array, using the appropriate constant type.

source
Base.collectMethod
collect(ca::ConstantArray)

Convert a constant array back to a Julia array.

source
LLVM.ConstantExprType
LLVM.ConstantExpr <: LLVM.Constant

A constant value that is initialized with an expression using other constant values.

Constant expressions are created using const_-prefixed functions, which correspond to the LLVM IR instructions: const_neg, const_not, etc.

source

Global values

LLVM.global_value_typeFunction
global_value_type(val::LLVM.GlobalValue)

Get the type of the global value.

This differs from value_type in that it returns the type of the contained value, not the type of the global value itself which is always a pointer type.

source
LLVM.parentMethod
parent(val::LLVM.GlobalValue)

Get the parent module of the global value.

source
LLVM.isdeclarationFunction
isdeclaration(val::LLVM.GlobalValue)

Check if the global value is a declaration, i.e. it does not have a definition.

source
LLVM.linkageFunction
linkage(val::LLVM.GlobalValue)

Get the linkage of the global value.

source
LLVM.linkage!Function
linkage!(val::LLVM.GlobalValue, linkage::LLVM.LLVMLinkage)

Set the linkage of the global value.

source
LLVM.sectionFunction
section(val::LLVM.GlobalValue)

Get the section of the global value.

source
LLVM.section!Function
section!(val::LLVM.GlobalValue, sec::String)

Set the section of the global value.

source
LLVM.visibilityFunction
visibility(val::LLVM.GlobalValue)

Get the visibility of the global value.

source
LLVM.visibility!Function
visibility!(val::LLVM.GlobalValue, viz::LLVM.LLVMVisibility)

Set the visibility of the global value.

source
LLVM.dllstorageFunction
dllstorage(val::LLVM.GlobalValue)

Get the DLL storage class of the global value.

source
LLVM.dllstorage!Function
dllstorage!(val::LLVM.GlobalValue, storage::LLVM.LLVMDLLStorageClass)

Set the DLL storage class of the global value.

source
LLVM.unnamed_addrFunction
unnamed_addr(val::LLVM.GlobalValue)

Check if the global value has the unnamed address flag set.

source
LLVM.unnamed_addr!Function
unnamed_addr!(val::LLVM.GlobalValue, flag::Bool)

Set the unnamed address flag of the global value.

source
LLVM.alignmentMethod
alignment(val::LLVM.GlobalValue)

Get the alignment of the global value.

source
LLVM.alignment!Method
alignment!(val::LLVM.GlobalValue, bytes::Integer)

Set the alignment of the global value.

source

Global variables

Global variables are a specific kind of global values, and have additional APIs:

LLVM.erase!Method
erase!(gv::GlobalVariable)

Remove the global variable from its parent module and delete it.

Warning

This function is unsafe as it does not check if the global variable is still used elsewhere.

source
LLVM.initializer!Function
initializer!(gv::GlobalVariable, val::Constant)

Set the initializer of the global variable. Setting the value to nothing removes the current initializer.

source
LLVM.threadlocal!Function
threadlocal!(gv::GlobalVariable, flag::Bool)

Set the thread-local flag of the global variable.

source
LLVM.threadlocalmode!Function
threadlocalmode!(gv::GlobalVariable, mode::LLVM.LLVMThreadLocalMode)

Set the thread-local mode of the global variable.

source
LLVM.isconstantMethod
isconstant(gv::GlobalVariable)

Check if the global variable is a global constant, i.e., its value is immutable throughout the runtime execution of the program.

source
LLVM.constant!Function
constant!(gv::GlobalVariable, flag::Bool)

Set the constant flag of the global variable.

source
LLVM.isextinitFunction
isextinit(gv::GlobalVariable)

Check if the global variable is externally initialized.

source
LLVM.extinit!Function
extinit!(gv::GlobalVariable, flag::Bool)

Set the externally initialized flag of the global variable.

source

Uses

LLVM.replace_uses!Function
replace_uses!(old::LLVM.Value, new::LLVM.Value)

Replace all uses of an old value in the IR with new.

This does not replace uses in metadata, which must be done separately with replace_metadata_uses!.

source
LLVM.usesFunction
uses(val::LLVM.Value)

Get an iterator over the uses of the given value.

See also: LLVM.Use.

source
LLVM.UseType
LLVM.Use

A use of a value in the IR. Knows both the user and the used value.

See also: user, value.

source
LLVM.userFunction
user(use::LLVM.Use)

Get the user of the given use.

source
LLVM.valueFunction
value(use::LLVM.Use)

Get the used value of the given use.

source
diff --git a/dev/man/analyses/index.html b/dev/man/analyses/index.html index 48c97e74..3d0edcc9 100644 --- a/dev/man/analyses/index.html +++ b/dev/man/analyses/index.html @@ -39,4 +39,4 @@ true julia> dominates(tree, first(instructions(foo)), first(instructions(entry))) -false +false diff --git a/dev/man/blocks/index.html b/dev/man/blocks/index.html index a000b81f..a97a9fdb 100644 --- a/dev/man/blocks/index.html +++ b/dev/man/blocks/index.html @@ -8,4 +8,4 @@ julia> collect(instructions(bb)) 2-element Vector{Instruction}: %2 = add i64 %1, %0 - ret i64 %2

In addition to the iteration interface, it is possible to move from one instruction to the previous or next one using respectively the previnst and nextinst functions.

+ ret i64 %2

In addition to the iteration interface, it is possible to move from one instruction to the previous or next one using respectively the previnst and nextinst functions.

diff --git a/dev/man/codegen/index.html b/dev/man/codegen/index.html index 97b7078a..f3a942b6 100644 --- a/dev/man/codegen/index.html +++ b/dev/man/codegen/index.html @@ -49,4 +49,4 @@ !llvm.module.flags = !{!0, !1} !0 = !{i32 1, !"wasm-feature-mutable-globals", i32 43} -!1 = !{i32 1, !"wasm-feature-sign-ext", i32 43}

The data layout object can be used to query various properties that are relevant for generating IR:

+!1 = !{i32 1, !"wasm-feature-sign-ext", i32 43}

The data layout object can be used to query various properties that are relevant for generating IR:

diff --git a/dev/man/essentials/index.html b/dev/man/essentials/index.html index fa362373..aec36463 100644 --- a/dev/man/essentials/index.html +++ b/dev/man/essentials/index.html @@ -40,4 +40,4 @@ WARNING: An unknown instance of MemoryBuffer is being disposed of.

Finally, when not properly disposing of an object, LLVM.jl will warn about the leaked object when the process exits:

julia> ctx = Context();
 
 julia> exit()
-WARNING: An instance of Context was not properly disposed of.
+WARNING: An instance of Context was not properly disposed of.
diff --git a/dev/man/execution/index.html b/dev/man/execution/index.html index 963d23a3..bf4298e7 100644 --- a/dev/man/execution/index.html +++ b/dev/man/execution/index.html @@ -37,4 +37,4 @@ julia> ts_mod() do mod string(mod) end -"; ModuleID = 'SomeModule'\nsource_filename = \"SomeModule\"\n" +"; ModuleID = 'SomeModule'\nsource_filename = \"SomeModule\"\n" diff --git a/dev/man/functions/index.html b/dev/man/functions/index.html index 1efa9350..7b44088b 100644 --- a/dev/man/functions/index.html +++ b/dev/man/functions/index.html @@ -58,4 +58,4 @@ entry(fun) top: %2 = add i64 %1, %0 - ret i64 %2

In addition to the iteration interface, it is possible to move from one basic block to the previous or next one using respectively the prevblock and nextblock functions.

+ ret i64 %2

In addition to the iteration interface, it is possible to move from one basic block to the previous or next one using respectively the prevblock and nextblock functions.

diff --git a/dev/man/instructions/index.html b/dev/man/instructions/index.html index 152418d8..2ab6a908 100644 --- a/dev/man/instructions/index.html +++ b/dev/man/instructions/index.html @@ -20,4 +20,4 @@ julia> fast_math!(inst; nnan=true) julia> inst -%1 = fadd nnan float %0, 1.000000e+00 +%1 = fadd nnan float %0, 1.000000e+00 diff --git a/dev/man/interop/index.html b/dev/man/interop/index.html index 0732341c..b42a57b0 100644 --- a/dev/man/interop/index.html +++ b/dev/man/interop/index.html @@ -90,4 +90,4 @@ %0 = icmp slt i64 %"b::Int64", %"a::Int64" call void @llvm.assume(i1 %0) ret i64 %"a::Int64" -}

To abort execution, the trap() function can be used, generating a call to @llvm.trap.

Optimization passes

Julia's LLVM passes are usable in the same way as LLVM's passes, and are automatically available to any PassBuilder. Similarly, the default Julia optimization pipeline can be used through the JuliaPipeline pipeline object.

julia> run!(JuliaPipeline(), mod)

This object supports many keyword arguments to configure the pipeline; refer to the API documentation for more information.

+}

To abort execution, the trap() function can be used, generating a call to @llvm.trap.

Optimization passes

Julia's LLVM passes are usable in the same way as LLVM's passes, and are automatically available to any PassBuilder. Similarly, the default Julia optimization pipeline can be used through the JuliaPipeline pipeline object.

julia> run!(JuliaPipeline(), mod)

This object supports many keyword arguments to configure the pipeline; refer to the API documentation for more information.

diff --git a/dev/man/metadata/index.html b/dev/man/metadata/index.html index 751f9ec9..f09872c2 100644 --- a/dev/man/metadata/index.html +++ b/dev/man/metadata/index.html @@ -49,4 +49,4 @@ julia> file(scope(dbg)) <0x6000000beb80> = !DIFile(filename: "int.jl", directory: ".")

Debug info can also be attached to functions, which can be queried and modified using respectively subprogram and subprogram!:

julia> sp = subprogram(add)
-<0x600003edfad0> = distinct !DISubprogram(name: "+", linkageName: "julia_+", scope: null, file: <0x600003ba6fe0>, line: 87, type: <0x600003494c90>, scopeLine: 87, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: <0x6000021d8428>, retainedNodes: <0x6000010f09d0>)
+<0x600003edfad0> = distinct !DISubprogram(name: "+", linkageName: "julia_+", scope: null, file: <0x600003ba6fe0>, line: 87, type: <0x600003494c90>, scopeLine: 87, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: <0x6000021d8428>, retainedNodes: <0x6000010f09d0>) diff --git a/dev/man/modules/index.html b/dev/man/modules/index.html index 3058677a..c710a997 100644 --- a/dev/man/modules/index.html +++ b/dev/man/modules/index.html @@ -67,4 +67,4 @@ define void @foo() { ret void -} +} diff --git a/dev/man/transforms/index.html b/dev/man/transforms/index.html index cb2ebb0b..e7b4afaa 100644 --- a/dev/man/transforms/index.html +++ b/dev/man/transforms/index.html @@ -96,4 +96,4 @@ top1: ; No predecessors! %3 = add i64 %1, 42 ret i64 %3 -}

This of course isn't very useful by itself, but can be a useful starting point for more complex transformations.

+}

This of course isn't very useful by itself, but can be a useful starting point for more complex transformations.

diff --git a/dev/man/types/index.html b/dev/man/types/index.html index 49cfb6fb..9ec73501 100644 --- a/dev/man/types/index.html +++ b/dev/man/types/index.html @@ -70,4 +70,4 @@ true julia> types(ctx)["Foo"] -%Foo = type opaque +%Foo = type opaque diff --git a/dev/man/values/index.html b/dev/man/values/index.html index 8205573c..9018127f 100644 --- a/dev/man/values/index.html +++ b/dev/man/values/index.html @@ -80,4 +80,4 @@ julia> replace_uses!(inst1, ConstantInt(Int64(42))) julia> inst2 -ret i64 42 +ret i64 42