2012-05-09 00:50:35 +08:00
|
|
|
llvm-diff - LLVM structural 'diff'
|
|
|
|
==================================
|
|
|
|
|
[docs][tools] Add missing "program" tags to rst files
Sphinx allows for definitions of command-line options using
`.. option <name>` and references to those options via `:option:<name>`.
However, it looks like there is no scoping of these options by default,
meaning that links can end up pointing to incorrect documents. See for
example the llvm-mca document, which contains references to -o that,
prior to this patch, pointed to a different document. What's worse is
that these links appear to be non-deterministic in which one is picked
(on my machine, some references end up pointing to opt, whereas on the
live docs, they point to llvm-dwarfdump, for example).
The fix is to add the .. program <name> tag. This essentially namespaces
the options (definitions and references) to the named program, ensuring
that the links are kept correct.
Reviwed by: andreadb
Differential Revision: https://reviews.llvm.org/D63873
llvm-svn: 364538
2019-06-27 21:24:46 +08:00
|
|
|
.. program:: llvm-diff
|
2012-05-09 00:50:35 +08:00
|
|
|
|
|
|
|
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.
|