1llvm-diff - LLVM structural 'diff'
2==================================
3
4.. program:: llvm-diff
5
6SYNOPSIS
7--------
8
9**llvm-diff** [*options*] *module 1* *module 2* [*global name ...*]
10
11DESCRIPTION
12-----------
13
14**llvm-diff** compares the structure of two LLVM modules, primarily
15focusing on differences in function definitions.  Insignificant
16differences, such as changes in the ordering of globals or in the
17names of local values, are ignored.
18
19An input module will be interpreted as an assembly file if its name
20ends in '.ll';  otherwise it will be read in as a bitcode file.
21
22If a list of global names is given, just the values with those names
23are compared; otherwise, all global values are compared, and
24diagnostics are produced for globals which only appear in one module
25or the other.
26
27**llvm-diff** compares two functions by comparing their basic blocks,
28beginning with the entry blocks.  If the terminators seem to match,
29then the corresponding successors are compared; otherwise they are
30ignored.  This algorithm is very sensitive to changes in control flow,
31which tend to stop any downstream changes from being detected.
32
33**llvm-diff** is intended as a debugging tool for writers of LLVM
34passes and frontends.  It does not have a stable output format.
35
36EXIT STATUS
37-----------
38
39If **llvm-diff** finds no differences between the modules, it will exit
40with 0 and produce no output.  Otherwise it will exit with a non-zero
41value.
42
43BUGS
44----
45
46Many important differences, like changes in linkage or function
47attributes, are not diagnosed.
48
49Changes in memory behavior (for example, coalescing loads) can cause
50massive detected differences in blocks.
51