diff options
Diffstat (limited to 'usr.bin/clang/llvm-diff')
-rw-r--r-- | usr.bin/clang/llvm-diff/Makefile | 9 | ||||
-rw-r--r-- | usr.bin/clang/llvm-diff/Makefile.depend | 23 | ||||
-rw-r--r-- | usr.bin/clang/llvm-diff/llvm-diff.1 | 76 |
3 files changed, 108 insertions, 0 deletions
diff --git a/usr.bin/clang/llvm-diff/Makefile b/usr.bin/clang/llvm-diff/Makefile new file mode 100644 index 000000000000..90eddc9551d9 --- /dev/null +++ b/usr.bin/clang/llvm-diff/Makefile @@ -0,0 +1,9 @@ +PROG_CXX= llvm-diff + +SRCDIR= llvm/tools/llvm-diff +SRCS+= lib/DiffConsumer.cpp +SRCS+= lib/DiffLog.cpp +SRCS+= lib/DifferenceEngine.cpp +SRCS+= llvm-diff.cpp + +.include "../llvm.prog.mk" diff --git a/usr.bin/clang/llvm-diff/Makefile.depend b/usr.bin/clang/llvm-diff/Makefile.depend new file mode 100644 index 000000000000..73df5dd192a7 --- /dev/null +++ b/usr.bin/clang/llvm-diff/Makefile.depend @@ -0,0 +1,23 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/clang/libllvm \ + lib/libc \ + lib/libc++ \ + lib/libcompiler_rt \ + lib/libcxxrt \ + lib/libthr \ + lib/libz \ + lib/msun \ + lib/ncurses/ncursesw \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.bin/clang/llvm-diff/llvm-diff.1 b/usr.bin/clang/llvm-diff/llvm-diff.1 new file mode 100644 index 000000000000..93439bd08dad --- /dev/null +++ b/usr.bin/clang/llvm-diff/llvm-diff.1 @@ -0,0 +1,76 @@ +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "LLVM-DIFF" "1" "2023-05-24" "16" "LLVM" +.SH NAME +llvm-diff \- LLVM structural 'diff' +.SH SYNOPSIS +.sp +\fBllvm\-diff\fP [\fIoptions\fP] \fImodule 1\fP \fImodule 2\fP [\fIglobal name ...\fP] +.SH DESCRIPTION +.sp +\fBllvm\-diff\fP compares the structure of two LLVM modules, primarily +focusing on differences in function definitions. Insignificant +differences, such as changes in the ordering of globals or in the +names of local values, are ignored. +.sp +An input module will be interpreted as an assembly file if its name +ends in \(aq.ll\(aq; otherwise it will be read in as a bitcode file. +.sp +If a list of global names is given, just the values with those names +are compared; otherwise, all global values are compared, and +diagnostics are produced for globals which only appear in one module +or the other. +.sp +\fBllvm\-diff\fP compares two functions by comparing their basic blocks, +beginning with the entry blocks. If the terminators seem to match, +then the corresponding successors are compared; otherwise they are +ignored. This algorithm is very sensitive to changes in control flow, +which tend to stop any downstream changes from being detected. +.sp +\fBllvm\-diff\fP is intended as a debugging tool for writers of LLVM +passes and frontends. It does not have a stable output format. +.SH EXIT STATUS +.sp +If \fBllvm\-diff\fP finds no differences between the modules, it will exit +with 0 and produce no output. Otherwise it will exit with a non\-zero +value. +.SH BUGS +.sp +Many important differences, like changes in linkage or function +attributes, are not diagnosed. +.sp +Changes in memory behavior (for example, coalescing loads) can cause +massive detected differences in blocks. +.SH AUTHOR +Maintained by the LLVM Team (https://llvm.org/). +.SH COPYRIGHT +2003-2023, LLVM Project +.\" Generated by docutils manpage writer. +. |