LLVM-DIFF(1)
π
LLVM-DIFF(1) β llvm-diff, the LLVM structural 'diff' π
okay bestie, welcome to the LLVM-DIFF(1) manual page β yes, that's the manual name, and we're doing this together π
π NAME π
llvm-diff β LLVM structural 'diff'
β¨ SYNOPSIS β¨
llvm-diff [options] module 1 module 2 [global name ...]
π¦ DESCRIPTION π¦
okay so llvm-diff compares the structure of two LLVM modules, and it's primarily focused on differences in function definitions. Insignificant differences β like changes in the ordering of globals or in the names of local values β are ignored. Iconic, honestly β¨
Here's the file-type vibe check: an input module will be interpreted as an assembly file if its name ends in .ll; otherwise it will be read in as a bitcode file. No cap.
If a list of global names is given, just the values with those names are compared. Otherwise, all global values are compared, and diagnostics are produced for globals which only appear in one module or the other. π
llvm-diff compares two functions by comparing their basic blocks, beginning with the entry blocks. If the terminators seem to match, then the corresponding successors are compared; otherwise they are ignored. This algorithm is very sensitive to changes in control flow, and those changes tend to stop any downstream changes from being detected. So yeah, control-flow changes are highkey the main character here π
llvm-diff is intended as a debugging tool for writers of LLVM passes and frontends. It does not have a stable output format. That's the vibe β useful, not polished for your scrapbook. π«Ά
π EXIT STATUS π
If llvm-diff finds no differences between the modules, it will exit with 0 and produce no output. Otherwise it will exit with a non-zero value. Clean exit = no drama; non-zero = not that clean no-difference exit, periodt π
π BUGS π
Many important differences, like changes in linkage or function attributes, are not diagnosed. Yep, it can miss those. π
Changes in memory behavior (for example, coalescing loads) can cause massive detected differences in blocks. So sometimes the diff is like "bestie, why are there so many changes" and it's memory behavior doing its thing π
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/). π
β COPYRIGHT β
2003-2025, LLVM Project
Catch u later, bestie β page 19, date 2025-01-17, LLVM Project, LLVM-DIFF(1) manual, all the LLVM vibes π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms