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