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