opnsense-src/usr.bin/clang/bugpoint/bugpoint.1
Dimitry Andric af732203b8 Merge llvm-project 12.0.1 release and follow-up fixes
Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.

PR:		255570

(cherry picked from commit e8d8bef961)

Merge llvm-project 12.0.0 release

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.0-0-gd28af7c654d8, a.k.a. 12.0.0 release.

PR:		255570

(cherry picked from commit d409305fa3)

Disable strict-fp for powerpcspe, as it does not work properly yet

Merge commit 5c18d1136665 from llvm git (by Qiu Chaofan)

  [SPE] Disable strict-fp for SPE by default

  As discussed in PR50385, strict-fp on PowerPC SPE has not been
  handled well. This patch disables it by default for SPE.

  Reviewed By: nemanjai, vit9696, jhibbits

  Differential Revision: https://reviews.llvm.org/D103235

PR:		255570

(cherry picked from commit 715df83abc)

Apply upstream libc++ fix to allow building with devel/xxx-xtoolchain-gcc

Merge commit 52e9d80d5db2 from llvm git (by Jason Liu):

  [libc++] add `inline` for __open's definition in ifstream and ofstream

  Summary:

  When building with gcc on AIX, it seems that gcc does not like the
  `always_inline` without the `inline` keyword.
  So adding the inline keywords in for __open in ifstream and ofstream.
  That will also make it consistent with __open in basic_filebuf
  (it seems we added `inline` there before for gcc build as well).

  Differential Revision: https://reviews.llvm.org/D99422

PR:		255570

(cherry picked from commit d099db2546)

Undefine HAVE_(DE)REGISTER_FRAME in llvm's config.h on arm

Otherwise, the lli tool (enable by WITH_CLANG_EXTRAS) won't link on arm,
stating that __register_frame is undefined. This function is normally
provided by libunwind, but explicitly not for the ARM Exception ABI.

Reported by:	oh
PR:		255570

(cherry picked from commit f336b45e94)

Merge llvm-project 12.0.1 rc2

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2.

PR:		255570

(cherry picked from commit 23408297fb)

Revert libunwind change to fix backtrace segfault on aarch64

Revert commit 22b615a96593 from llvm git (by Daniel Kiss):

  [libunwind] Support for leaf function unwinding.

  Unwinding leaf function is useful in cases when the backtrace finds a
  leaf function for example when it caused a signal.
  This patch also add the support for the DW_CFA_undefined because it marks
  the end of the frames.

  Ryan Prichard provided code for the tests.

  Reviewed By: #libunwind, mstorsjo

  Differential Revision: https://reviews.llvm.org/D83573

  Reland with limit the test to the x86_64-linux target.

Bisection has shown that this particular upstream commit causes programs
using backtrace(3) on aarch64 to segfault. This affects the lang/rust
port, for instance. Until we can upstream to fix this problem, revert
the commit for now.

Reported by:	mikael
PR:		256864

(cherry picked from commit 5866c369e4)

Merge llvm-project 12.0.1 release

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-0-gfed41342a82f, a.k.a. 12.0.1 release.

PR:		255570

(cherry picked from commit 4652422eb4)

compilert-rt: build out-of-line LSE atomics helpers for aarch64

Both clang >= 12 and gcc >= 10.1 now default to -moutline-atomics for
aarch64. This requires a bunch of helper functions in libcompiler_rt.a,
to avoid link errors like "undefined symbol: __aarch64_ldadd8_acq_rel".

(Note: of course you can use -mno-outline-atomics as a workaround too,
but this would negate the potential performance benefit of the faster
LSE instructions.)

Bump __FreeBSD_version so ports maintainers can easily detect this.

PR:		257392

(cherry picked from commit cc55ee8009)
2021-07-31 20:56:55 +02:00

309 lines
8.8 KiB
Groff

.\" $FreeBSD$
.\" 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 "BUGPOINT" "1" "2021-06-07" "12" "LLVM"
.SH NAME
bugpoint \- automatic test case reduction tool
.SH SYNOPSIS
.sp
\fBbugpoint\fP [\fIoptions\fP] [\fIinput LLVM ll/bc files\fP] [\fILLVM passes\fP] \fB\-\-args\fP
\fIprogram arguments\fP
.SH DESCRIPTION
.sp
\fBbugpoint\fP narrows down the source of problems in LLVM tools and passes. It
can be used to debug three types of failures: optimizer crashes, miscompilations
by optimizers, or bad native code generation (including problems in the static
and JIT compilers). It aims to reduce large test cases to small, useful ones.
For more information on the design and inner workings of \fBbugpoint\fP, as well as
advice for using bugpoint, see /Bugpoint in the LLVM
distribution.
.SH OPTIONS
.sp
\fB\-\-additional\-so\fP \fIlibrary\fP
.INDENT 0.0
.INDENT 3.5
Load the dynamic shared object \fIlibrary\fP into the test program whenever it is
run. This is useful if you are debugging programs which depend on non\-LLVM
libraries (such as the X or curses libraries) to run.
.UNINDENT
.UNINDENT
.sp
\fB\-\-append\-exit\-code\fP=\fI{true,false}\fP
.INDENT 0.0
.INDENT 3.5
Append the test programs exit code to the output file so that a change in exit
code is considered a test failure. Defaults to false.
.UNINDENT
.UNINDENT
.sp
\fB\-\-args\fP \fIprogram args\fP
.INDENT 0.0
.INDENT 3.5
Pass all arguments specified after \fB\-\-args\fP to the test program whenever it runs.
Note that if any of the \fIprogram args\fP start with a "\fB\-\fP", you should use:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
bugpoint [bugpoint args] \-\-args \-\- [program args]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The "\fB\-\-\fP" right after the \fB\-\-args\fP option tells \fBbugpoint\fP to consider
any options starting with "\fB\-\fP" to be part of the \fB\-\-args\fP option, not as
options to \fBbugpoint\fP itself.
.UNINDENT
.UNINDENT
.sp
\fB\-\-tool\-args\fP \fItool args\fP
.INDENT 0.0
.INDENT 3.5
Pass all arguments specified after \fB\-\-tool\-args\fP to the LLVM tool under test
(\fBllc\fP, \fBlli\fP, etc.) whenever it runs. You should use this option in the
following way:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
bugpoint [bugpoint args] \-\-tool\-args \-\- [tool args]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The "\fB\-\-\fP" right after the \fB\-\-tool\-args\fP option tells \fBbugpoint\fP to
consider any options starting with "\fB\-\fP" to be part of the \fB\-\-tool\-args\fP
option, not as options to \fBbugpoint\fP itself. (See \fB\-\-args\fP, above.)
.UNINDENT
.UNINDENT
.sp
\fB\-\-safe\-tool\-args\fP \fItool args\fP
.INDENT 0.0
.INDENT 3.5
Pass all arguments specified after \fB\-\-safe\-tool\-args\fP to the "safe" execution
tool.
.UNINDENT
.UNINDENT
.sp
\fB\-\-gcc\-tool\-args\fP \fIgcc tool args\fP
.INDENT 0.0
.INDENT 3.5
Pass all arguments specified after \fB\-\-gcc\-tool\-args\fP to the invocation of
\fBgcc\fP\&.
.UNINDENT
.UNINDENT
.sp
\fB\-\-opt\-args\fP \fIopt args\fP
.INDENT 0.0
.INDENT 3.5
Pass all arguments specified after \fB\-\-opt\-args\fP to the invocation of \fBopt\fP\&.
.UNINDENT
.UNINDENT
.sp
\fB\-\-disable\-{dce,simplifycfg}\fP
.INDENT 0.0
.INDENT 3.5
Do not run the specified passes to clean up and reduce the size of the test
program. By default, \fBbugpoint\fP uses these passes internally when attempting to
reduce test programs. If you\(aqre trying to find a bug in one of these passes,
\fBbugpoint\fP may crash.
.UNINDENT
.UNINDENT
.sp
\fB\-\-enable\-valgrind\fP
.INDENT 0.0
.INDENT 3.5
Use valgrind to find faults in the optimization phase. This will allow
bugpoint to find otherwise asymptomatic problems caused by memory
mis\-management.
.UNINDENT
.UNINDENT
.sp
\fB\-find\-bugs\fP
.INDENT 0.0
.INDENT 3.5
Continually randomize the specified passes and run them on the test program
until a bug is found or the user kills \fBbugpoint\fP\&.
.UNINDENT
.UNINDENT
.sp
\fB\-help\fP
.INDENT 0.0
.INDENT 3.5
Print a summary of command line options.
.UNINDENT
.UNINDENT
.sp
\fB\-\-input\fP \fIfilename\fP
.INDENT 0.0
.INDENT 3.5
Open \fIfilename\fP and redirect the standard input of the test program, whenever
it runs, to come from that file.
.UNINDENT
.UNINDENT
.sp
\fB\-\-load\fP \fIplugin\fP
.INDENT 0.0
.INDENT 3.5
Load the dynamic object \fIplugin\fP into \fBbugpoint\fP itself. This object should
register new optimization passes. Once loaded, the object will add new command
line options to enable various optimizations. To see the new complete list of
optimizations, use the \fB\-help\fP and \fB\-\-load\fP options together; for example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
bugpoint \-\-load myNewPass.so \-help
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.sp
\fB\-\-mlimit\fP \fImegabytes\fP
.INDENT 0.0
.INDENT 3.5
Specifies an upper limit on memory usage of the optimization and codegen. Set
to zero to disable the limit.
.UNINDENT
.UNINDENT
.sp
\fB\-\-output\fP \fIfilename\fP
.INDENT 0.0
.INDENT 3.5
Whenever the test program produces output on its standard output stream, it
should match the contents of \fIfilename\fP (the "reference output"). If you
do not use this option, \fBbugpoint\fP will attempt to generate a reference output
by compiling the program with the "safe" backend and running it.
.UNINDENT
.UNINDENT
.sp
\fB\-\-run\-{int,jit,llc,custom}\fP
.INDENT 0.0
.INDENT 3.5
Whenever the test program is compiled, \fBbugpoint\fP should generate code for it
using the specified code generator. These options allow you to choose the
interpreter, the JIT compiler, the static native code compiler, or a
custom command (see \fB\-\-exec\-command\fP) respectively.
.UNINDENT
.UNINDENT
.sp
\fB\-\-safe\-{llc,custom}\fP
.INDENT 0.0
.INDENT 3.5
When debugging a code generator, \fBbugpoint\fP should use the specified code
generator as the "safe" code generator. This is a known\-good code generator
used to generate the "reference output" if it has not been provided, and to
compile portions of the program that as they are excluded from the testcase.
These options allow you to choose the
static native code compiler, or a custom command, (see \fB\-\-exec\-command\fP)
respectively. The interpreter and the JIT backends cannot currently
be used as the "safe" backends.
.UNINDENT
.UNINDENT
.sp
\fB\-\-exec\-command\fP \fIcommand\fP
.INDENT 0.0
.INDENT 3.5
This option defines the command to use with the \fB\-\-run\-custom\fP and
\fB\-\-safe\-custom\fP options to execute the bitcode testcase. This can
be useful for cross\-compilation.
.UNINDENT
.UNINDENT
.sp
\fB\-\-compile\-command\fP \fIcommand\fP
.INDENT 0.0
.INDENT 3.5
This option defines the command to use with the \fB\-\-compile\-custom\fP
option to compile the bitcode testcase. The command should exit with a
failure exit code if the file is "interesting" and should exit with a
success exit code (i.e. 0) otherwise (this is the same as if it crashed on
"interesting" inputs).
.sp
This can be useful for
testing compiler output without running any link or execute stages. To
generate a reduced unit test, you may add CHECK directives to the
testcase and pass the name of an executable compile\-command script in this form:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
#!/bin/sh
llc "$@"
not FileCheck [bugpoint input file].ll < bugpoint\-test\-program.s
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
This script will "fail" as long as FileCheck passes. So the result
will be the minimum bitcode that passes FileCheck.
.UNINDENT
.UNINDENT
.sp
\fB\-\-safe\-path\fP \fIpath\fP
.INDENT 0.0
.INDENT 3.5
This option defines the path to the command to execute with the
\fB\-\-safe\-{int,jit,llc,custom}\fP
option.
.UNINDENT
.UNINDENT
.sp
\fB\-\-verbose\-errors\fP=\fI{true,false}\fP
.INDENT 0.0
.INDENT 3.5
The default behavior of bugpoint is to print "<crash>" when it finds a reduced
test that crashes compilation. This flag prints the output of the crashing
program to stderr. This is useful to make sure it is the same error being
tracked down and not a different error that happens to crash the compiler as
well. Defaults to false.
.UNINDENT
.UNINDENT
.SH EXIT STATUS
.sp
If \fBbugpoint\fP succeeds in finding a problem, it will exit with 0. Otherwise,
if an error occurs, it will exit with a non\-zero value.
.SH SEE ALSO
.sp
\fBopt(1)\fP
.SH AUTHOR
Maintained by the LLVM Team (https://llvm.org/).
.SH COPYRIGHT
2003-2021, LLVM Project
.\" Generated by docutils manpage writer.
.