Skip to content

llvmir.target

llvmir dialect

LLVMIR target-family record. The selector chooses an LLVMIR bundle row while optional LLVM-specific attributes own the triple, data layout, CPU, and feature-string vocabulary.

Operation contract

Property Value
Semantic phase module metadata
Traits SymbolDefine
Interfaces TargetLike

Symbol contract

Property Value
Kind target
Defining field symbol
Interfaces target, record
Flags

Signature

Kind Name Type Cardinality Description
Attribute symbol symbol required
Attribute kind enum LlvmirTargetKind required
Attribute codegen_format enum SnapshotCodegenFormat optional
Attribute artifact_format enum ArtifactFormatAttr optional
Attribute default_pointer_bitwidth i64 optional
Attribute index_bitwidth i64 optional
Attribute offset_bitwidth i64 optional
Attribute max_workgroup_size_x i64 optional
Attribute max_workgroup_size_y i64 optional
Attribute max_workgroup_size_z i64 optional
Attribute max_flat_workgroup_size i64 optional
Attribute max_workgroup_storage_bytes i64 optional Maximum function-local workgroup storage in bytes.
Attribute subgroup_size i64 optional
Attribute max_grid_size_x i64 optional
Attribute max_grid_size_y i64 optional
Attribute max_grid_size_z i64 optional
Attribute max_flat_grid_size i64 optional
Attribute max_workgroup_count_x i64 optional
Attribute max_workgroup_count_y i64 optional
Attribute max_workgroup_count_z i64 optional
Attribute memory_space_generic i64 optional
Attribute memory_space_global i64 optional
Attribute memory_space_workgroup i64 optional
Attribute memory_space_constant i64 optional
Attribute memory_space_private i64 optional
Attribute memory_space_host i64 optional
Attribute memory_space_descriptor i64 optional
Attribute abi enum ExportAbiKind optional
Attribute export_symbol string optional
Attribute linkage enum ExportLinkage optional
Attribute contract_set_key string optional
Attribute contract_feature_bits i64 optional
Attribute triple string required LLVM target triple emitted into the module and passed to LLVM tools.
Attribute data_layout string optional LLVM data layout emitted into the module when present.
Attribute cpu string optional LLVM target CPU passed to LLVM tools when present.
Attribute features string optional LLVM target feature string passed to LLVM tools when present.

Examples

llvmir.target<object> @llvm_host {triple = "x86_64-unknown-linux-gnu"}