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