Skip to main content

Module llvm

Module llvm 

Source

Re-exportsΒ§

use std::ffi::CStr; πŸ”’
use std::ffi::CString; πŸ”’
use std::num::NonZero; πŸ”’
use std::ptr; πŸ”’
use std::string::FromUtf8Error; πŸ”’
use libc::c_uint; πŸ”’
use rustc_abi::AddressSpace; πŸ”’
use rustc_abi::Align; πŸ”’
use rustc_abi::Size; πŸ”’
use rustc_abi::WrappingRange; πŸ”’
use rustc_llvm::RustString; πŸ”’
pub(crate) use self::branded::Context; πŸ”’
pub(crate) use self::branded::ContextRaw; πŸ”’
pub(crate) use self::branded::Module; πŸ”’
pub(crate) use self::branded::ModuleRaw; πŸ”’
pub(crate) use self::branded::Type; πŸ”’
pub(crate) use self::branded::Value; πŸ”’
pub(crate) use self::branded::wrap_llcx; πŸ”’
pub(crate) use self::branded::wrap_llmod; πŸ”’
pub(crate) use self::CallConv::*; πŸ”’

ModulesΒ§

Enzyme_AD πŸ”’
branded πŸ”’
Lifetime-branded references to things manipulated by the LLVM bindings.
conversions πŸ”’
Conversions from backend-independent data types to/from LLVM FFI types.
debuginfo πŸ”’
diagnostic πŸ”’
LLVM diagnostic reports.
enzyme_ffi πŸ”’
ffi πŸ”’
Bindings to the LLVM-C API (LLVM*), and to our own extern "C" wrapper functions around the unstable LLVM C++ API (LLVMRust*).
fixed_kinds πŸ”’
metadata_kind πŸ”’
offload_ffi πŸ”’
tpde_ffi πŸ”’

MacrosΒ§

declare_fixed_metadata_kinds πŸ”’
load_ptrs_by_symbols_fn πŸ”’
load_ptrs_by_symbols_mut_void πŸ”’

StructsΒ§

AllocKindFlags πŸ”’
Bool πŸ”’
In the LLVM-C API, boolean values are passed as typedef int LLVMBool, which has a different ABI from Rust or C++ bool.
Builder πŸ”’
EnzymeTypeTree πŸ”’
EnzymeWrapper πŸ”’
GEPNoWrapFlags πŸ”’
Intrinsic πŸ”’
InvariantOpaque πŸ”’
LLVMRustTpdeOptions πŸ”’
LLVMRustTpdeOptions
Linker πŸ”’
MetadataKindId πŸ”’
OperandBundle πŸ”’
Opaque pointee of LLVMOperandBundleRef.
OperandBundleBox πŸ”’
Owning pointer to an OperandBundle that will dispose of the bundle when dropped.
RawEnum πŸ”’
Wrapper for a raw enum value returned from LLVM’s C APIs.
RustOffloadWrapper πŸ”’
SanitizerOptions πŸ”’
LLVMRustSanitizerOptions
ThinLTOModule πŸ”’
LLVMRustThinLTOModule
TpdeWrapper πŸ”’
TypeTree πŸ”’

EnumsΒ§

AsmDialect πŸ”’
Must match the layout of LLVMInlineAsmDialect.
AtomicOrdering πŸ”’
LLVMAtomicOrdering
AtomicRmwBinOp πŸ”’
LLVMAtomicRmwBinOp
AttributeKind πŸ”’
Must match the layout of LLVMRustAttributeKind. Semantically a subset of the C++ enum llvm::Attribute::AttrKind, though it is not ABI compatible (since it’s a C++ enum)
AttributePlace πŸ”’
CConcreteType πŸ”’
CallConv πŸ”’
LLVM CallingConv::ID. Should we wrap this?
ChecksumKind πŸ”’
LLVMRustChecksumKind
CodeGenOptLevel πŸ”’
LLVMRustCodeGenOptLevel
CodeModel πŸ”’
LLVMRustCodeModel
CompressionKind πŸ”’
Must match the layout of LLVMRustCompressionKind.
DLLStorageClass πŸ”’
LLVMDLLStorageClass
DiagnosticKind πŸ”’
LLVMRustDiagnosticKind
DiagnosticSeverity πŸ”’
LLVMDiagnosticSeverity
EnzymeLibraryError πŸ”’
FileType πŸ”’
LLVMRustFileType
FloatAbi πŸ”’
LLVMRustFloatABI
FramePointerKind πŸ”’
Must match the layout of llvm::FramePointerKind.
IntPredicate πŸ”’
LLVMIntPredicate
LLVMRustResult πŸ”’
LLVMRustTpdeMode πŸ”’
LLVMRustTpdeMode
LLVMRustVerifierFailureAction πŸ”’
Linkage πŸ”’
Must match the layout of LLVMLinkage.
MemoryEffects πŸ”’
LLVMRustMemoryEffects
ModuleFlagMergeBehavior πŸ”’
Must match the layout of LLVMRustModuleFlagMergeBehavior.
Opcode πŸ”’
LLVMOpcode
OptStage πŸ”’
LLVMRustOptStage
PassBuilderOptLevel πŸ”’
LLVMRustPassBuilderOptLevel
RealPredicate πŸ”’
LLVMRealPredicate
RelocModel πŸ”’
LLVMRustRelocModel
RustOffloadLibraryError πŸ”’
TailCallKind πŸ”’
Must match the layout of LLVMTailCallKind.
ThreadLocalMode πŸ”’
LLVMThreadLocalMode
TpdeLibraryError πŸ”’
TypeKind πŸ”’
Must match the layout of LLVMTypeKind.
UWTableKind πŸ”’
Must match the layout of llvm::UWTableKind.
UnnamedAddr πŸ”’
LLVMUnnamedAddr
Visibility πŸ”’
Must match the layout of LLVMVisibility.

ConstantsΒ§

FALSE πŸ”’
MD_DIAssignID πŸ”’
MD_absolute_symbol πŸ”’
MD_access_group πŸ”’
MD_alias_scope πŸ”’
MD_align πŸ”’
MD_annotation πŸ”’
MD_associated πŸ”’
MD_callback πŸ”’
MD_callees πŸ”’
MD_callsite πŸ”’
MD_coro_outside_frame πŸ”’
MD_dbg πŸ”’
MD_dereferenceable πŸ”’
MD_dereferenceable_or_null πŸ”’
MD_exclude πŸ”’
MD_fpmath πŸ”’
MD_func_sanitize πŸ”’
MD_invariant_group πŸ”’
MD_invariant_load πŸ”’
MD_irr_loop πŸ”’
MD_kcfi_type πŸ”’
MD_loop πŸ”’
MD_make_implicit πŸ”’
MD_mem_parallel_loop_access πŸ”’
MD_memprof πŸ”’
MD_mmra πŸ”’
MD_noalias πŸ”’
MD_noalias_addrspace πŸ”’
MD_nonnull πŸ”’
MD_nontemporal πŸ”’
MD_nosanitize πŸ”’
MD_noundef πŸ”’
MD_pcsections πŸ”’
MD_preserve_access_index πŸ”’
MD_prof πŸ”’
MD_range πŸ”’
MD_section_prefix πŸ”’
MD_tbaa πŸ”’
MD_tbaa_struct πŸ”’
MD_type πŸ”’
MD_unpredictable πŸ”’
MD_vcall_visibility πŸ”’
TRUE πŸ”’

StaticsΒ§

ENZYME_INSTANCE πŸ”’
OFFLOAD_INSTANCE πŸ”’
TPDE_INSTANCE πŸ”’

TraitsΒ§

FromGeneric πŸ”’
Helper trait for converting backend-independent types to LLVM-specific types, for FFI purposes.
ToLlvmBool πŸ”’
Convenience trait to convert bool to llvm::Bool with an explicit method call.

FunctionsΒ§

AddCallSiteAttributes πŸ”’
AddFunctionAttributes πŸ”’
CreateAlignmentAttr πŸ”’
CreateAllocKindAttr πŸ”’
CreateAllocSizeAttr πŸ”’
CreateAttrString πŸ”’
CreateAttrStringValue πŸ”’
CreateAttrStringValueFromCStr πŸ”’
CreateByRefAttr πŸ”’
CreateByValAttr πŸ”’
CreateDereferenceableAttr πŸ”’
CreateDereferenceableOrNullAttr πŸ”’
CreateRangeAttr πŸ”’
CreateStructRetAttr πŸ”’
CreateUWTableAttr πŸ”’
HasStringAttribute πŸ”’
RemoveStringAttrFromFn πŸ”’
SetFunctionCallConv πŸ”’
SetInstructionCallConv πŸ”’
SetUniqueComdat πŸ”’
add_alias πŸ”’
Safe wrapper for LLVMAddAlias2
add_global πŸ”’
add_module_flag_str πŸ”’
add_module_flag_u32 πŸ”’
append_module_inline_asm πŸ”’
Safe wrapper for LLVMRustAppendModuleInlineAsm, which delegates to Module::appendModuleInlineAsm.
build_byte_buffer πŸ”’
build_string πŸ”’
const_ptr_auth πŸ”’
Safe wrapper for LLVMRustConstPtrAuth.
count_params πŸ”’
get_linkage πŸ”’
get_param πŸ”’
Safe wrapper around LLVMGetParam, because segfaults are no fun.
get_value_name πŸ”’
Safe wrapper for LLVMGetValueName2 Needs to allocate the value, because set_value_name will invalidate the pointer.
get_visibility πŸ”’
is_declaration πŸ”’
last_error πŸ”’
load_ptr_by_symbol_mut_void πŸ”’
set_alignment πŸ”’
set_comdat πŸ”’
Get the named comdat from llmod and assign it to llglobal.
set_dllimport_storage_class πŸ”’
set_dso_local πŸ”’
set_externally_initialized πŸ”’
set_global_constant πŸ”’
set_initializer πŸ”’
set_linkage πŸ”’
set_section πŸ”’
set_thread_local_mode πŸ”’
set_unnamed_address πŸ”’
set_value_name πŸ”’
Safe wrapper for LLVMSetValueName2 from a byte slice
set_visibility πŸ”’
twine_to_string πŸ”’

Type AliasesΒ§

CTypeTreeRef πŸ”’
DiagnosticHandlerCallback πŸ”’
Must match the declaration of LLVMRustDiagnosticHandlerCallback.
EnzymeFreeTypeTreeFn πŸ”’
EnzymeMergeTypeTreeFn πŸ”’
EnzymeNewTypeTreeCTFn πŸ”’
EnzymeNewTypeTreeFn πŸ”’
EnzymeNewTypeTreeTRFn πŸ”’
EnzymeSetCLBoolFn πŸ”’
EnzymeSetCLStringFn πŸ”’
EnzymeTypeTreeData0EqFn πŸ”’
EnzymeTypeTreeInsertEqFn πŸ”’
EnzymeTypeTreeOnlyEqFn πŸ”’
EnzymeTypeTreeShiftIndiciesEqFn πŸ”’
EnzymeTypeTreeToStringFn πŸ”’
EnzymeTypeTreeToStringFreeFn πŸ”’
GetSymbolsCallback πŸ”’
GetSymbolsErrorCallback πŸ”’
LLVMGetPassPluginInfoFn πŸ”’
LLVMRustOffloadMapperFn πŸ”’
LLVMRustOffloadWrapImagesFn πŸ”’
SelfProfileAfterPassCallback πŸ”’
SelfProfileBeforePassCallback πŸ”’

Foreign TypesΒ§

TargetMachine