7 Enumerations
LLVM uses enumerations to represent various configuration options, types, and flags. This section documents the commonly used enumerations in racket-llvm.
7.1 Type and Value Classification
syntax
llvm-void-type-kind — Void type
llvm-integer-type-kind — Integer type
llvm-float-type-kind — IEEE 754 single-precision float
llvm-double-type-kind — IEEE 754 double-precision float
llvm-label-type-kind — Label type for basic blocks
llvm-function-type-kind — Function type
llvm-struct-type-kind — Struct type
llvm-array-type-kind — Array type
llvm-pointer-type-kind — Pointer type
llvm-vector-type-kind — Vector type
llvm-metadata-type-kind — Metadata type
Other floating-point and special types
syntax
llvm-argument-value-kind — Function argument
llvm-basic-block-value-kind — Basic block
llvm-function-value-kind — Function
llvm-global-variable-value-kind — Global variable
llvm-global-alias-value-kind — Global alias
llvm-constant-int-value-kind — Constant integer
llvm-constant-fp-value-kind — Constant floating-point
llvm-instruction-value-kind — Instruction
Other constant and special value kinds
7.2 Linkage and Visibility
syntax
llvm-external-linkage — External linkage (default)
llvm-available-externally-linkage — Available externally
llvm-link-once-any-linkage — Link once, any definition
llvm-link-once-odr-linkage — Link once, one definition rule (ODR)
llvm-weak-any-linkage — Weak linkage, any definition
llvm-weak-odr-linkage — Weak linkage, ODR
llvm-appending-linkage — Appending linkage
llvm-internal-linkage — Internal (static) linkage
llvm-private-linkage — Private linkage
llvm-external-weak-linkage — External weak linkage
llvm-common-linkage — Common linkage
syntax
llvm-default-visibility — Default visibility
llvm-hidden-visibility — Hidden visibility (not exported from shared library)
llvm-protected-visibility — Protected visibility (exported but not overridable)
7.3 Addressing and Storage
syntax
llvm-no-unnamed-addr — Address is significant
llvm-local-unnamed-addr — Address is locally unnamed
llvm-global-unnamed-addr — Address is globally unnamed
syntax
llvm-default-storage-class — Default storage class
llvmdll-import-storage-class — DLL import
llvmdll-export-storage-class — DLL export
7.4 Thread-Local Storage
syntax
llvm-not-thread-local — Not thread-local (default)
llvm-general-dynamic-tls-model — General dynamic TLS model
llvm-local-dynamic-tls-model — Local dynamic TLS model
llvm-initial-exec-tls-model — Initial exec TLS model
llvm-local-exec-tls-model — Local exec TLS model
7.5 Calling Conventions
syntax
llvmc-call-conv — C calling convention (default)
llvm-fast-call-conv — Fast calling convention
llvm-cold-call-conv — Cold calling convention
llvmx86-stdcall-call-conv — x86 stdcall
llvmx86-fastcall-call-conv — x86 fastcall
llvm-arm-aapcs-call-conv — ARM AAPCS
llvmx8664-sys-v-call-conv — x86-64 System V
llvm-win64-call-conv — Windows x64
llvm-preserve-most-call-conv — Preserve most registers
llvm-preserve-all-call-conv — Preserve all registers
Other platform and architecture specific conventions
7.6 Enums for Atomic Operations
syntax
llvm-atomic-ordering-not-atomic — Non-atomic
llvm-atomic-ordering-unordered — Unordered
llvm-atomic-ordering-monotonic — Monotonic
llvm-atomic-ordering-acquire — Acquire semantics
llvm-atomic-ordering-release — Release semantics
llvm-atomic-ordering-acquire-release — Acquire-release semantics
llvm-atomic-ordering-sequentially-consistent — Sequential consistency
syntax
llvm-atomic-rmw-bin-op-xchg — Exchange
llvm-atomic-rmw-bin-op-add — Add
llvm-atomic-rmw-bin-op-sub — Subtract
llvm-atomic-rmw-bin-op-and — Bitwise AND
llvm-atomic-rmw-bin-op-or — Bitwise OR
llvm-atomic-rmw-bin-op-xor — Bitwise XOR
llvm-atomic-rmw-bin-op-max — Maximum (signed)
llvm-atomic-rmw-bin-op-min — Minimum (signed)
llvm-atomic-rmw-bin-op-u-max — Maximum (unsigned)
llvm-atomic-rmw-bin-op-u-min — Minimum (unsigned)
Floating-point operations: llvm-atomic-rmw-bin-op-f-add, llvm-atomic-rmw-bin-op-f-sub, etc.
7.7 Function Call Optimization
syntax
llvm-tail-call-kind-none — No tail call optimization
llvm-tail-call-kind-tail — May be tail called
llvm-tail-call-kind-must-tail — Must be tail called
llvm-tail-call-kind-no-tail — Cannot be tail called
7.8 Enums for Inline Assembly
syntax
llvm-inline-asm-dialect-att — AT&T assembly syntax
llvm-inline-asm-dialect-intel — Intel assembly syntax
7.9 Code Generation Configuration
syntax
llvm-code-gen-level-none — No optimization
llvm-code-gen-level-less — Less optimization (faster compilation)
llvm-code-gen-level-default — Default optimization
llvm-code-gen-level-aggressive — Aggressive optimization
syntax
llvm-reloc-default — Default relocation model
llvm-reloc-static — Static relocation
llvm-reloc-pic — Position-independent code (PIC)
llvm-reloc-dynamic-no-pic — Dynamic with no PIC
llvm-reloc-ropi — Read-only position-independent
llvm-reloc-rwpi — Read-write position-independent
llvm-reloc-ropi-rwpi — Both read-only and read-write PIC
syntax
llvm-code-model-default — Default code model
llvm-code-model-jit-default — JIT default
llvm-code-model-tiny — Tiny (32KB code)
llvm-code-model-small — Small (2GB code)
llvm-code-model-kernel — Kernel (512MB absolute addresses)
llvm-code-model-medium — Medium (2GB code, unlimited data)
llvm-code-model-large — Large (unlimited)
syntax
llvm-assembly-file — Emit assembly code
llvm-object-file — Emit object file
7.10 Module and Debug Information
llvm-module-flag-behavior-error — Error on conflict
llvm-module-flag-behavior-warning — Warn on conflict
llvm-module-flag-behavior-require — Require the flag
llvm-module-flag-behavior-override — Override existing flag
llvm-module-flag-behavior-append — Append to existing flag
llvm-module-flag-behavior-append-unique — Append only if unique
syntax
Flags are bitwise combinations of debug info properties controlling visibility, virtuality, and other metadata properties for debug information.
llvmdwarf-source-language-c — C
llvmdwarf-source-language-c-plus-plus — C++
llvmdwarf-source-language-c99 — C99
llvmdwarf-source-language-java — Java
llvmdwarf-source-language-obj-c — Objective-C
llvmdwarf-source-language-obj-c-plus-plus — Objective-C++
Other language identifiers
syntax
llvmdwarf-emission-kind-none — No debug information
llvmdwarf-emission-kind-full — Full debug information
llvmdwarf-emission-kind-line-tables-only — Line tables only
7.11 Other Enumerations
llvmds-error — Error
llvmds-warning — Warning
llvmds-remark — Remark
llvmds-note — Note
llvm-any-comdat-selection-kind — Any definition
llvm-exact-match-comdat-selection-kind — Exact match required
llvm-largest-comdat-selection-kind — Select largest
llvm-no-deduplicate-comdat-selection-kind — No deduplication
llvm-same-size-comdat-selection-kind — Same size only
syntax
llvm-binary-type-archive — Archive (static library)
llvm-binary-type-coff — COFF object file (Windows)
llvm-binary-type-elf32l — ELF 32-bit little-endian
llvm-binary-type-elf64l — ELF 64-bit little-endian
llvm-binary-type-mach-o64l — Mach-O 64-bit (macOS)
llvm-binary-type-wasm — WebAssembly
llvm-binary-type-ir — LLVM IR
Other binary formats
llvm-global-i-sel-abort-enable — Enable, abort on failure
llvm-global-i-sel-abort-disable — Disable GlobalISel
llvm-global-i-sel-abort-disable-with-diag — Disable and show diagnostics