Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
LLVM
Logo
LLVM
  • Frequently Asked Questions (FAQ)
  • The LLVM Lexicon
  • Getting Started/Tutorials
    • Architecture & Platform Information for Compiler Writers
    • Performance Tips for Frontend Authors
    • Getting Started with the LLVM System
    • Getting Started with the LLVM System using Microsoft Visual Studio
    • LLVM Programmer’s Manual
    • Debugging LLVM
    • LLVM Tutorial: Table of Contents
      • My First Language Frontend with LLVM Tutorial
      • 1. Kaleidoscope: Kaleidoscope Introduction and the Lexer
      • 2. Kaleidoscope: Implementing a Parser and AST
      • 3. Kaleidoscope: Code generation to LLVM IR
      • 4. Kaleidoscope: Adding JIT and Optimizer Support
      • 5. Kaleidoscope: Extending the Language: Control Flow
      • 6. Kaleidoscope: Extending the Language: User-defined Operators
      • 7. Kaleidoscope: Extending the Language: Mutable Variables
      • 8. Kaleidoscope: Compiling to Object Code
      • 9. Kaleidoscope: Adding Debug Information
      • 10. Kaleidoscope: Conclusion and other useful LLVM tidbits
      • 1. Building a JIT: Starting out with KaleidoscopeJIT
      • 2. Building a JIT: Adding Optimizations – An introduction to ORC Layers
      • 3. Building a JIT: Per-function Lazy Compilation
      • 4. Building a JIT: Extreme Laziness - Using LazyReexports to JIT from ASTs
    • MyFirstTypoFix
  • Reference
    • How To Use Attributes
    • LLVM Command Guide
      • FileCheck - Flexible pattern matching file verifier
      • clang-tblgen - Description to C++ Code for Clang
      • dsymutil - manipulate archived DWARF debug symbol files
      • lit - LLVM Integrated Tester
      • llc - LLVM static compiler
      • lldb-tblgen - Description to C++ Code for LLDB
      • lli - directly execute programs from LLVM bitcode
      • llubi - LLVM UB-aware Interpreter
      • llvm-addr2line - a drop-in replacement for addr2line
      • llvm-ar - LLVM archiver
      • llvm-as - LLVM assembler
      • llvm-bcanalyzer - LLVM bitcode analyzer
      • llvm-cgdata - LLVM CodeGen Data Tool
      • llvm-config - Print LLVM compilation options
      • llvm-cov - emit coverage information
      • llvm-cxxfilt - LLVM symbol name demangler
      • llvm-cxxmap - Mangled name remapping tool
      • llvm-debuginfo-analyzer - Print a logical representation of low-level debug information.
      • llvm-diff - LLVM structural ‘diff’
      • llvm-dis - LLVM disassembler
      • llvm-dwarfdump - dump and verify DWARF debug information
      • llvm-dwarfutil - A tool to copy and manipulate debug info
      • llvm-exegesis - LLVM Machine Instruction Benchmark
      • llvm-extract - extract a function from an LLVM module
      • llvm-extract-bundle-entry - extract an offload bundle entry
      • llvm-ifs - shared object stubbing tool
      • llvm-install-name-tool - LLVM tool for manipulating install-names and rpaths
      • llvm-ir2vec - IR2Vec and MIR2Vec Embedding Generation Tool
      • llvm-lib - LLVM lib.exe compatible library tool
      • llvm-libtool-darwin - LLVM tool for creating libraries for Darwin
      • llvm-link - LLVM bitcode linker
      • llvm-lipo - LLVM tool for manipulating universal binaries
      • llvm-locstats - calculate statistics on DWARF debug location
      • llvm-mc - LLVM Machine Code Playground
      • llvm-mca - LLVM Machine Code Analyzer
      • llvm-nm - list LLVM bitcode and object file’s symbol table
      • llvm-objcopy - object copying and editing tool
      • llvm-objdump - LLVM’s object file dumper
      • llvm-offload-binary - LLVM Offload Binary Packager
      • llvm-opt-report - generate optimization report from YAML
      • llvm-otool - Mach-O dumping tool
      • llvm-pdbutil - PDB File forensics and diagnostics
      • llvm-profdata - Profile data tool
      • llvm-profgen - LLVM SPGO profile generation tool
      • llvm-ranlib - generates an archive index
      • llvm-readelf - GNU-style LLVM Object Reader
      • llvm-readobj - LLVM Object Reader
      • llvm-reduce - LLVM automatic testcase reducer.
      • llvm-remarkutil - Remark utility
      • llvm-size - print size information
      • llvm-stress - generate random .ll files
      • llvm-strings - print strings
      • llvm-strip - object stripping tool
      • llvm-symbolizer - convert addresses into source code locations
      • llvm-tblgen - Target Description to C++ Code for LLVM
      • llvm-test-mustache-spec - LLVM tool to test Mustache library compliance
      • llvm-tli-checker - TargetLibraryInfo vs library checker
      • mlir-tblgen - Description to C++ Code for MLIR
      • opt - LLVM optimizer
      • tblgen - Description to C++ Code
    • Using -opt-bisect-limit to debug optimization errors
    • Symbolizer Markup Format
    • The PDB File Format
      • The MSF File Format
      • The PDB Info Stream (aka the PDB Stream)
      • The PDB TPI and IPI Streams
      • The PDB DBI (Debug Info) Stream
      • The Module Information Stream
      • The PDB Public Symbol Stream
      • The PDB Global Symbol Stream
      • The PDB Serialized Hash Table Format
      • Introduction
      • On-Disk Format
      • Present and Deleted Bit Vectors
      • CodeView Symbol Records
      • CodeView Type Records
    • Garbage Collection with LLVM
    • Garbage Collection Safepoints in LLVM
    • libFuzzer – a library for coverage-guided fuzz testing.
    • Fuzzing LLVM libraries and tools
    • LLVM Language Reference Manual
    • LLVM IR Undefined Behavior (UB) Manual
    • Design and Usage of the InAlloca Attribute
    • LLVM Bitcode File Format
    • Machine IR (MIR) Format Reference Manual
    • Global Instruction Selection
      • Generic Machine IR
      • Generic Opcodes
      • MIR Patterns in TableGen
      • Core Pipeline
      • Porting GlobalISel to A New Target
      • Resources
      • IRTranslator
      • Legalizer
      • RegBankSelect
      • InstructionSelect
      • Known Bits Analysis
    • Convergent Operation Semantics
    • LLVM Testing Infrastructure Guide
      • test-suite Guide
    • GWP-ASan
    • XRay Instrumentation
    • Debugging with XRay
    • FaultMaps and implicit checks
    • LLVM Atomic Instructions and Concurrency Guide
    • Exception Handling in LLVM
    • LLVM Extensions
    • How to set up LLVM-style RTTI for your class hierarchy
    • LLVM Block Frequency Terminology
    • LLVM Branch Weight Metadata
    • The Often Misunderstood GEP Instruction
    • Scudo Hardened Allocator
    • Memory Model Relaxation Annotations
    • MemTagSanitizer
    • Dependence Graphs in LLVM
    • Speculative Load Hardening
    • Segmented Stacks in LLVM
    • LLVM’s Optional Rich Disassembly Output
    • Stack maps and patch points in LLVM
    • Coroutines in LLVM
    • Pointer Authentication
    • YAML I/O
    • Convergence And Uniformity
    • Machine Learning - Guided Optimization (MLGO)
    • Content Addressable Storage
    • LLVM CI Best Practices
    • LLVM AI Tool Use Policy
    • .llvm.callgraph Section Layout
    • LLVM Interface Export Annotations
    • LLVM PC Sections Metadata
    • LLVM Qualification Group
    • LLVM Security Response Group
    • LLVM Security Group Transparency Reports
    • System Library
    • Code Transformation Metadata
    • Type Metadata
    • XRay Flight Data Recorder Trace Format
  • User Guides
    • How To Build On ARM
    • How To Build Clang and LLVM with Profile-Guided Optimizations
    • How to cross-compile Clang/LLVM using Clang/LLVM
    • LLVM Code Coverage Mapping Format
    • Control Flow Verification Tool Design Document
    • Building a Distribution of LLVM
    • Building LLVM with CMake
    • A guide to Dockerfiles for building LLVM
    • Support Library
    • Advanced Build Configurations
    • Writing an LLVM Pass
    • Writing an LLVM Pass (legacy PM version)
    • LLVM’s Analysis and Transform Passes
      • KernelInfo
      • Loop Fusion in LLVM
    • Stack Safety Analysis
    • MergeFunctions pass, how it works
    • LLVM Alias Analysis Infrastructure
    • MemorySSA
    • MemProf: Memory Profiling for LLVM
    • LLVM Loop Terminology (and Canonical Forms)
    • LLVM Cycle Terminology
    • Auto-Vectorization in LLVM
      • Vectorization Plan
      • The Sandbox Vectorizer
    • LLVM Link Time Optimization: Design and Implementation
    • DTLTO
    • The LLVM gold plugin
    • Remarks
    • Source Level Debugging with LLVM
      • Debug Info Assignment Tracking
    • How to Update Debug Info: A Guide for LLVM Pass Authors
    • The LLVM Instrumentor Pass
    • Instruction referencing for debug info
    • Debug info migration: From intrinsics to records
    • Key Instructions debug info in LLVM and Clang
    • Instrumentation Profile Format
    • InstCombine contributor guide
    • Writing an LLVM Backend
      • How To Use Instruction Mappings
    • The LLVM Target-Independent Code Generator
    • TableGen Overview
      • TableGen BackEnds
      • 1 TableGen Backend Developer’s Guide
      • 1 TableGen Programmer’s Reference
    • MCJIT Design and Implementation
    • ORC Design and Implementation
    • JITLink and ORC’s ObjectLinkingLayer
    • Debugging JIT-ed Code
    • CommandLine 2.0 Library Manual
    • Extending LLVM: Adding instructions, intrinsics, types, etc.
    • How To Add A Constrained Floating-Point Intrinsic
    • How to build Windows Itanium applications.
    • How to Cross Compile Compiler-rt Builtins For Arm
    • Using ARM NEON instructions in big-endian mode
    • Support for AArch64 Scalable Matrix Extension in LLVM
    • Compiling CUDA with clang
    • User Guide for NVPTX Back-end
    • User Guide for AMDGPU Backend
      • Syntax of GFX7 Instructions
        • attr
        • dst
        • hwreg
        • imm16
        • imm16
        • label
        • m
        • msg
        • opt
        • opt
        • param
        • sbase
        • sbase
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • simm32
        • simm32
        • soffset
        • soffset
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • srsrc
        • srsrc
        • ssamp
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • tgt
        • Type Deviation
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vcc
        • vdata0
        • vdata0
        • vdata1
        • vdata1
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • waitcnt
      • Syntax of GFX8 Instructions
        • attr
        • dst
        • hwreg
        • imask
        • imm16
        • imm16
        • label
        • m
        • m
        • msg
        • opt
        • opt
        • param
        • probe
        • sbase
        • sbase
        • sdata
        • sdata
        • sdata
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • simm32
        • simm32
        • simm32
        • soffset
        • soffset
        • soffset
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • srsrc
        • srsrc
        • ssamp
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • tgt
        • Type Deviation
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vcc
        • vdata0
        • vdata0
        • vdata1
        • vdata1
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • waitcnt
      • Syntax of Core GFX9 Instructions
        • attr
        • dst
        • hwreg
        • imask
        • imm16
        • imm16
        • label
        • m
        • m
        • msg
        • opt
        • opt
        • param
        • probe
        • saddr
        • saddr
        • sbase
        • sbase
        • sbase
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • simm32
        • simm32
        • simm32
        • soffset
        • soffset
        • soffset
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • srsrc
        • srsrc
        • ssamp
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • tgt
        • Type Deviation
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vcc
        • vdata0
        • vdata0
        • vdata1
        • vdata1
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • waitcnt
      • Syntax of gfx900, gfx902, gfx909 and gfx90c Instructions
        • FX Operand
        • m
        • src
        • src
        • vdst
      • Syntax of gfx904 Instructions
        • FX Operand
        • m
        • src
        • src
        • vdst
      • Syntax of gfx906 Instructions
        • FX Operand
        • m
        • m
        • src
        • src
        • src
        • src
        • src
        • Type Deviation
        • vdst
        • vsrc
      • Syntax of gfx908 Instructions
        • FX Operand
        • m
        • m
        • saddr
        • soffset
        • src
        • src
        • src
        • src
        • src
        • src
        • srsrc
        • Type Deviation
        • vaddr
        • vaddr
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
      • Syntax of gfx90a Instructions
        • dst
        • FX Operand
        • hwreg
        • imask
        • imm16
        • imm16
        • label
        • m
        • m
        • msg
        • opt
        • opt
        • probe
        • saddr
        • saddr
        • sbase
        • sbase
        • sbase
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • simm32
        • simm32
        • simm32
        • soffset
        • soffset
        • soffset
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • srsrc
        • srsrc
        • ssamp
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • Type Deviation
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vcc
        • vdata0
        • vdata0
        • vdata1
        • vdata1
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • waitcnt
      • Syntax of gfx942 Instructions
        • dst
        • dst
        • FX Operand
        • hwreg
        • imask
        • imm16
        • imm16
        • label
        • m
        • m
        • msg
        • opt
        • opt
        • probe
        • saddr
        • saddr
        • sbase
        • sbase
        • sbase
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • simm32
        • simm32
        • simm32
        • soffset
        • soffset
        • soffset
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • srsrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • Type Deviation
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vcc
        • vdata0
        • vdata0
        • vdata1
        • vdata1
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • waitcnt
      • Syntax of GFX950 Instructions
        • addr
        • addr
        • data
        • data
        • data
        • data
        • data0
        • data0
        • data0
        • data0
        • data1
        • data1
        • literal
        • literal
        • literal
        • saddr
        • saddr
        • sbase
        • sbase
        • sbase
        • scale_src0
        • scale_src1
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • simm16
        • simm16
        • simm16
        • simm16
        • simm16
        • soffset
        • soffset
        • soffset
        • src0
        • src0
        • src0
        • src0
        • src0
        • src0
        • src0
        • src0
        • src0
        • src0
        • src0
        • src0
        • src0
        • src0
        • src1
        • src1
        • src1
        • src1
        • src1
        • src1
        • src1
        • src1
        • src2
        • src2
        • src2
        • src2
        • src2
        • src2
        • src2
        • src2
        • src2
        • srsrc
        • ssrc0
        • ssrc0
        • ssrc0
        • ssrc0
        • ssrc0
        • ssrc1
        • ssrc1
        • ssrc1
        • ssrc1
        • vaddr
        • vcc
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vsrc0
        • vsrc0
        • vsrc0
        • vsrc0
        • vsrc0
        • vsrc0
        • vsrc1
        • vsrc1
        • vsrc1
      • Syntax of GFX10 RDNA1 Instructions
        • attr
        • dst
        • FX Operand
        • hwreg
        • imm16
        • imm16
        • label
        • m
        • m
        • msg
        • opt
        • opt
        • param
        • probe
        • saddr
        • saddr
        • sbase
        • sbase
        • sbase
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • simm32
        • simm32
        • simm32
        • soffset
        • soffset
        • soffset
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • srsrc
        • srsrc
        • ssamp
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • tgt
        • Type Deviation
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vcc
        • vdata0
        • vdata0
        • vdata1
        • vdata1
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • waitcnt
        • waitcnt_depctr
      • Syntax of gfx1011 and gfx1012 Instructions
        • src
        • src
        • src
        • src
        • Type Deviation
        • vdst
        • vsrc
      • Syntax of gfx1013 Instructions
        • srsrc
        • srsrc
        • vaddr
        • vaddr
        • vdst
        • vdst
      • Syntax of GFX10 RDNA2 Instructions
        • attr
        • dst
        • FX Operand
        • hwreg
        • imm16
        • imm16
        • label
        • m
        • m
        • msg
        • opt
        • opt
        • param
        • saddr
        • saddr
        • saddr
        • sbase
        • sbase
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • simm32
        • simm32
        • simm32
        • soffset
        • soffset
        • soffset
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • srsrc
        • srsrc
        • srsrc
        • ssamp
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • tgt
        • Type Deviation
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vcc
        • vdata0
        • vdata0
        • vdata1
        • vdata1
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • waitcnt
        • waitcnt_depctr
      • Syntax of GFX11 Instructions
        • attr
        • delay
        • dst
        • FX Operand
        • hwreg
        • imm16
        • imm16
        • label
        • m
        • m
        • msg
        • msg
        • opt
        • saddr
        • saddr
        • saddr
        • sbase
        • sbase
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • simm32
        • simm32
        • simm32
        • soffset
        • soffset
        • soffset
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • src
        • srsrc
        • srsrc
        • srsrc
        • ssamp
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • ssrc
        • tgt
        • Type Deviation
        • Type Deviation
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vcc
        • vdata0
        • vdata0
        • vdata1
        • vdata1
        • vdata1
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vij
        • vparam
        • vparam0
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • waitcnt
        • waitcnt_depctr
      • Syntax of GFX12 Instructions
        • addr
        • attr
        • data0
        • data0
        • data0
        • data0
        • data1
        • data1
        • data1
        • data1
        • ioffset
        • literal
        • literal
        • literal
        • literal
        • rsrc
        • rsrc
        • saddr
        • saddr
        • samp
        • sbase
        • sbase
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdata
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • sdst
        • simm16
        • simm16
        • simm16
        • simm16
        • simm16
        • simm16
        • simm16
        • simm16
        • soffset
        • soffset
        • soffset
        • src0
        • src0
        • src0
        • src0
        • src0
        • src0
        • src1
        • src1
        • src1
        • src1
        • src1
        • src1
        • src1
        • src1
        • src2
        • src2
        • src2
        • src2
        • src2
        • src2
        • src2
        • src2
        • srcx0
        • srcy0
        • ssrc0
        • ssrc0
        • ssrc0
        • ssrc0
        • ssrc0
        • ssrc0
        • ssrc1
        • ssrc1
        • tgt
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vaddr
        • vcc
        • vdata
        • vdata
        • vdata
        • vdata
        • vdata
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdst
        • vdstx
        • vdsty
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc
        • vsrc0
        • vsrc1
        • vsrc1
        • vsrc2
        • vsrc3
        • vsrcx1
        • vsrcy1
      • Syntax of AMDGPU Instruction Modifiers
      • Syntax of AMDGPU Instruction Operands
      • AMDGPU Instruction Syntax
      • AMDGPU Instructions Notation
      • DWARF Extensions For Heterogeneous Debugging
      • Allow Location Descriptions on the DWARF Expression Stack
      • Developer Guideline for AMDGPU
    • AMDGPU Asynchronous Operations
    • AMDGPU DMA Operations
    • AMDGPU Execution Synchronization
    • AMDGPU Memory Model
    • User Guide for SPIR-V Target
    • User Guide for the DirectX Target
      • DirectX Container
      • Architecture and Design of DXIL Support in LLVM
      • Specification of DXIL Operations using TableGen Representation
      • DXIL Resource Handling
      • Root Signatures
    • User Guide for RISC-V Target
    • RISC-V Vector Extension
    • Scheduling Information for RISC-V VCIX Instructions
    • Sandbox IR: A transactional layer over LLVM IR
    • Telemetry framework in LLVM
    • Lightweight Fault Isolation (LFI) in LLVM
    • LLVM Admin Tasks
    • Benchmarking tips
    • CMake Primer
    • LLVM Community Code of Conduct
    • FatLTO
    • LLVM GitHub User Guide
    • Markdown Quickstart Template
    • Misexpect
    • Opaque Pointers
    • Using the New Pass Manager
    • LLVM CoC Incident Reporting Guide
    • Response Guide
    • TableGen Fundamentals
    • yaml2obj
  • Discourse Migration Guide
  • Getting Involved
    • Contributing to LLVM
    • LLVM Developer Policy
    • LLVM Code-Review Policy and Practices
    • LLVM Community Support Policy
    • Sphinx Quickstart Template
    • How to submit an LLVM bug report
    • LLVM Bug Life Cycle
    • LLVM Coding Standards
    • Bisecting LLVM code
    • Policies on git repositories
    • Creating an LLVM Project
    • How To Release LLVM To The Public
    • How To Validate a New Release
    • How To Add Your Build Configuration To LLVM Buildbot Infrastructure
    • LLVM 23.0.0git Release Notes
    • How to start LLVM Social in your town
    • Moving LLVM Projects to GitHub
    • Bugpoint Redesign
    • Test-Suite Extensions
    • Variable Names Plan
    • Vector Predication Roadmap
  • Request For Comment (RFC) process
  • Project Governance
Back to top
View this page
Edit this page

llvm-link - LLVM bitcode linker¶

SYNOPSIS¶

llvm-link [options] filename …

DESCRIPTION¶

llvm-link takes several LLVM bitcode files and links them together into a single LLVM bitcode file. It writes the output file to standard output, unless the -o option is used to specify a filename.

OPTIONS¶

-f¶

Enable binary output on terminals. Normally, llvm-link will refuse to write raw bitcode output if the output stream is a terminal. With this option, llvm-link will write raw bitcode regardless of the output device.

-o filename¶

Specify the output file name. If filename is “-”, then llvm-link will write its output to standard output.

-S¶

Write output in LLVM intermediate language (instead of bitcode).

-d¶

If specified, llvm-link prints a human-readable version of the output bitcode file to standard error.

--help¶

Print a summary of command line options.

-v¶

Verbose mode. Print information about what llvm-link is doing. This typically includes a message for each bitcode file linked in and for each library found.

--override <filename>¶

Adds the passed-in file to the link and overrides symbols that have already been declared with the definitions in the file that is passed in. This flag can be specified multiple times to have multiple files act as overrides. If a symbol is declared more than twice, the definition from the file declared last takes precedence.

--import <function:filename>¶

Specify a function that should be imported from the specified file for linking with ThinLTO. This option can be specified multiple times to import multiple functions.

--summary-index <filename>¶

Specify the path to a file containing the module summary index with the results of an earlier ThinLTO link. This option is required when –import is used.

--internalize¶

Maintains existing linkage for symbols defined in the first input and converts linkage in all other inputs to internal linkage unless they are referenced by llvm*.used or are special-cased runtime functions (e.g. stack protector runtime).

--disable-debug-info-type-map¶

Disables the use of a uniquing type map for debug info.

--only-needed¶

Link only needed symbols.

--disable-lazy-loading¶

Disable lazy module loading.

--suppress-warnings¶

Suppress all linker warnings.

--preserve-bc-uselistorder¶

Preserve the use-list order when writing LLVM bitcode.

--preserve-ll-uselistorder¶

Preserve the use-list order when writing LLVM assembly.

--ignore-non-bitcode¶

Do not error out when a non-bitcode file is encountered while processing an archive.

EXIT STATUS¶

If llvm-link succeeds, it will exit with 0. Otherwise, if an error occurs, it will exit with a non-zero value.

Next
llvm-lipo - LLVM tool for manipulating universal binaries
Previous
llvm-libtool-darwin - LLVM tool for creating libraries for Darwin
Copyright © 2003-2026, LLVM Project
Made with Sphinx and @pradyunsg's Furo
Last updated on 2026-07-09
On this page
  • llvm-link - LLVM bitcode linker
    • SYNOPSIS
    • DESCRIPTION
    • OPTIONS
    • EXIT STATUS