Files
Reid Kleckner afe478be68 [docs] Convert first batch of CommandGuide docs to Markdown (#219625)
This change migrates half the CommandGuide rst files. Originally, we
were going to leave man pages out of scope, since migrating to markdown
there means that building man page docs requires an additional
dependency (myst-parser). However, Fedora at least is now grabbing the
generated groff file artifacts from our releases
([link](https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840/37?u=rnk)),
and I suspect other distros will be able to migrate to this model, or
install the necessary build dependency. The extra dependency is mostly a
concern for distros with long LTS timelines.

I reviewed the before and after, and I noticed *lots* of blockquoting
artifacts from extra indentation in the rst original. This was invisible
prior to the furo migration, but the new furo theme makes it very
visible, you can see if in the before/after pages, in particular in
lit.md.

Tracking issue: #201242
See the [migration guide] for more information. 

[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is a stacked PR based on #219624 , which will be a standalone
commit that
renames *.rst -> *.md before this PR lands for history preservation
purposes.
2026-08-31 11:52:04 -07:00

1.6 KiB

llvm-diff - LLVM structural 'diff'

SYNOPSIS

llvm-diff [options] module 1 module 2 [global name ...]

DESCRIPTION

llvm-diff compares the structure of two LLVM modules, primarily focusing on differences in function definitions. Insignificant differences, such as changes in the ordering of globals or in the names of local values, are ignored.

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.

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, which tend to stop any downstream changes from being detected.

llvm-diff is intended as a debugging tool for writers of LLVM passes and frontends. It does not have a stable output format.

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.

BUGS

Many important differences, like changes in linkage or function attributes, are not diagnosed.

Changes in memory behavior (for example, coalescing loads) can cause massive detected differences in blocks.