1LLVM-DIFF(1)                         LLVM                         LLVM-DIFF(1)
2
3
4

NAME

6       llvm-diff - LLVM structural 'diff'
7

SYNOPSIS

9       llvm-diff [options] module 1 module 2 [global name ...]
10

DESCRIPTION

12       llvm-diff  compares the structure of two LLVM modules, primarily focus‐
13       ing on differences in function definitions.  Insignificant differences,
14       such  as  changes  in  the ordering of globals or in the names of local
15       values, are ignored.
16
17       An input module will be interpreted as an assembly  file  if  its  name
18       ends in '.ll';  otherwise it will be read in as a bitcode file.
19
20       If  a  list  of global names is given, just the values with those names
21       are compared; otherwise, all global values are compared,  and  diagnos‐
22       tics  are  produced  for globals which only appear in one module or the
23       other.
24
25       llvm-diff compares two  functions  by  comparing  their  basic  blocks,
26       beginning  with  the  entry  blocks.  If the terminators seem to match,
27       then the corresponding successors  are  compared;  otherwise  they  are
28       ignored.   This algorithm is very sensitive to changes in control flow,
29       which tend to stop any downstream changes from being detected.
30
31       llvm-diff is intended as a debugging tool for writers  of  LLVM  passes
32       and frontends.  It does not have a stable output format.
33

EXIT STATUS

35       If  llvm-diff  finds  no  differences between the modules, it will exit
36       with 0 and produce no output.  Otherwise it will exit with  a  non-zero
37       value.
38

BUGS

40       Many  important  differences,  like  changes  in  linkage  or  function
41       attributes, are not diagnosed.
42
43       Changes in memory behavior (for example, coalescing  loads)  can  cause
44       massive detected differences in blocks.
45

AUTHOR

47       Maintained by the LLVM Team (https://llvm.org/).
48
50       2003-2020, LLVM Project
51
52
53
54
5511                                2020-10-15                      LLVM-DIFF(1)
Impressum