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