Skip to main content

Module llvm

Module llvm 

Source
Expand description

The LLVM backend. Queries of LLVM intrinsics, the host CPU and the CPUs and features of LLVM targets, which libtvm_tirx_llvm_backend registers when it is loaded. Target-dependent queries require an explicit target.

Functionsยง

cpu_has_feature
Return whether the CPU of target has the feature feature (codegen.llvm_cpu_has_feature).
get_cpu_archlist
Return the CPUs of the -mtriple of target (codegen.llvm_get_cpu_archlist).
get_cpu_features
Return the CPU features of the -mtriple, -mcpu and -mattr of target (codegen.llvm_get_cpu_features).
get_default_target_triple
Return the default LLVM target triple of the host (tvm.codegen.llvm.GetDefaultTargetTriple).
get_host_cpu_features
Return the features of the host CPU, each with a boolean saying whether it is enabled, or none when LLVM cannot tell (tvm.codegen.llvm.GetHostCPUFeatures).
get_host_cpu_name
Return the LLVM name of the host CPU (tvm.codegen.llvm.GetHostCPUName).
get_intrinsic_name
Return the name of the LLVM intrinsic intrin_id (codegen.llvm_get_intrinsic_name).
get_process_triple
Return the LLVM target triple of the running process (tvm.codegen.llvm.GetProcessTriple).
get_system_cpu
Return the LLVM name of the host CPU (codegen.llvm_get_system_cpu).
get_system_triple
Return the default LLVM target triple of the host (codegen.llvm_get_system_triple).
get_system_x86_vendor
Return the vendor of the host x86 CPU: intel, amd, unknown, or unimplemented on other CPUs (codegen.llvm_get_system_x86_vendor).
get_targets
Return the targets LLVM was built with (codegen.llvm_get_targets).
get_vector_width
Return the vector width of the CPU of target in bits, or -1 for a target that is not llvm (codegen.llvm_get_vector_width).
is_valid_cpu
Return whether LLVM knows the CPU cpu for the target triple triple (codegen.llvm_is_valid_cpu).
lookup_intrinsic_id
Return the id of the LLVM intrinsic name, or 0 when there is none (codegen.llvm_lookup_intrinsic_id).
target_enabled
Return whether LLVM can create a target machine for the target string target, such as "llvm -mtriple=aarch64-linux-gnu" (codegen.llvm_target_enabled).
version_major
Return the major version of LLVM (codegen.llvm_version_major).