llvm-dis
Disassemble LLVM bitcode into assembly language
TLDR
Convert a bitcode file as LLVM IR and write the result to stdout
Convert a bitcode file to an LLVM IR file with the same filename
Convert a bitcode file to LLVM IR, writing the result to the specified file
SYNOPSIS
llvm-dis [options] [filename]
PARAMETERS
-o
Specify the output filename. Defaults to .ll if the input is a file, or standard output if reading from standard input.
-help
Display available options.
-stats
Print statistics.
-time-passes
Record the amount of time each pass takes.
-disable-output
Disable output. Useful for timing passes.
-verify-each
Verify the program after each pass.
-version
Display the version of llvm-dis.
DESCRIPTION
llvm-dis takes LLVM bitcode files as input and converts them into human-readable LLVM assembly language (.ll) files. This process, known as disassembly, allows developers to inspect the compiled bitcode and understand the underlying instructions, data structures, and control flow of the program. llvm-dis is a crucial tool for debugging, reverse engineering, and optimizing LLVM-based applications. It can be used to examine the output of compilers like clang or other tools that generate LLVM bitcode. The output .ll file is a textual representation of the bitcode, making it easier to analyze and modify. By default, it reads standard input or files specified on the command line and writes the disassembled output to standard output or files with the .ll extension, respectively.
The disassembler is part of the LLVM toolchain, providing a fundamental utility for working with LLVM intermediate representation (IR). llvm-dis is helpful for users who want to understand how their high-level code has been translated into machine-independent assembly code by the compiler.
INPUT AND OUTPUT
If no input file is specified, llvm-dis reads from standard input. If the -o option is not used, llvm-dis writes to standard output when reading from standard input, and creates a file named .ll when reading from .
HISTORY
llvm-dis evolved as a component of the LLVM project, initially designed to provide a platform for compiler research and development. Its purpose was to facilitate the inspection and manipulation of LLVM's intermediate representation. Over time, its functionality has been refined, and it has become an integral tool for tasks such as code analysis, debugging, and optimization within the LLVM ecosystem.