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