Skip to content

Commit c9a2cd0

Browse files
committed
--- Merging r113303 into '.': A docs/CommandGuide/llvm-diff.pod U docs/CommandGuide/index.html Log: Add documentation for llvm-diff. llvm-svn: 113310
1 parent 75e5c50 commit c9a2cd0

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

llvm/docs/CommandGuide/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
<li><a href="/cmds/llvmc.html"><b>llvmc</b></a> -
7373
a generic customizable compiler driver</li>
7474

75+
<li><a href="/cmds/llvm-diff.html"><b>llvm-diff</b></a> -
76+
structurally compare two modules</li>
77+
7578
</ul>
7679

7780
</div>

llvm/docs/CommandGuide/llvm-diff.pod

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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

0 commit comments

Comments
 (0)