dim 9cedb8bb69 MFC 261991:
Upgrade our copy of llvm/clang to 3.4 release.  This version supports
all of the features in the current working draft of the upcoming C++
standard, provisionally named C++1y.

The code generator's performance is greatly increased, and the loop
auto-vectorizer is now enabled at -Os and -O2 in addition to -O3.  The
PowerPC backend has made several major improvements to code generation
quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ
backends have all seen major feature work.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.4/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>

MFC 262121 (by emaste):

Update lldb for clang/llvm 3.4 import

This commit largely restores the lldb source to the upstream r196259
snapshot with the addition of threaded inferior support and a few bug
fixes.

Specific upstream lldb revisions restored include:
   SVN      git
  181387  779e6ac
  181703  7bef4e2
  182099  b31044e
  182650  f2dcf35
  182683  0d91b80
  183862  15c1774
  183929  99447a6
  184177  0b2934b
  184948  4dc3761
  184954  007e7bc
  186990  eebd175

Sponsored by:	DARPA, AFRL

MFC 262186 (by emaste):

Fix mismerge in r262121

A break statement was lost in the merge.  The error had no functional
impact, but restore it to reduce the diff against upstream.

MFC 262303:

Pull in r197521 from upstream clang trunk (by rdivacky):

  Use the integrated assembler by default on FreeBSD/ppc and ppc64.

Requested by:	jhibbits

MFC 262611:

Pull in r196874 from upstream llvm trunk:

  Fix a crash that occurs when PWD is invalid.

  MCJIT needs to be able to run in hostile environments, even when PWD
  is invalid. There's no need to crash MCJIT in this case.

  The obvious fix is to simply leave MCContext's CompilationDir empty
  when PWD can't be determined. This way, MCJIT clients,
  and other clients that link with LLVM don't need a valid working directory.

  If we do want to guarantee valid CompilationDir, that should be done
  only for clients of getCompilationDir(). This is as simple as checking
  for an empty string.

  The only current use of getCompilationDir is EmitGenDwarfInfo, which
  won't conceivably run with an invalid working dir. However, in the
  purely hypothetically and untestable case that this happens, the
  AT_comp_dir will be omitted from the compilation_unit DIE.

This should help fix assertions occurring with ports-mgmt/tinderbox,
when it is using jails, and sometimes invalidates clang's current
working directory.

Reported by:	decke

MFC 262809:

Pull in r203007 from upstream clang trunk:

  Don't produce an alias between destructors with different calling conventions.

  Fixes pr19007.

(Please note that is an LLVM PR identifier, not a FreeBSD one.)

This should fix Firefox and/or libxul crashes (due to problems with
regparm/stdcall calling conventions) on i386.

Reported by:	multiple users on freebsd-current
PR:		bin/187103

MFC 263048:

Repair recognition of "CC" as an alias for the C++ compiler, since it
was silently broken by upstream for a Windows-specific use-case.

Apparently some versions of CMake still rely on this archaic feature...

Reported by:	rakuco

MFC 263049:

Garbage collect the old way of adding the libstdc++ include directories
in clang's InitHeaderSearch.cpp.  This has been superseded by David
Chisnall's commit in r255321.

Moreover, if libc++ is used, the libstdc++ include directories should
not be in the search path at all.  These directories are now only used
if you pass -stdlib=libstdc++.
2014-03-21 17:53:59 +00:00

199 lines
5.9 KiB
Groff

.\" $FreeBSD$
.\" Man page generated from reStructuredText.
.
.TH "OPT" "1" "2014-01-01" "3.4" "LLVM"
.SH NAME
opt \- LLVM optimizer
.
.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
..
.SH SYNOPSIS
.sp
\fBopt\fP [\fIoptions\fP] [\fIfilename\fP]
.SH DESCRIPTION
.sp
The \fBopt\fP command is the modular LLVM optimizer and analyzer. It
takes LLVM source files as input, runs the specified optimizations or analyses
on it, and then outputs the optimized file or the analysis results. The
function of \fBopt\fP depends on whether the \fI\-analyze\fP option is
given.
.sp
When \fI\-analyze\fP is specified, \fBopt\fP performs various analyses
of the input source. It will usually print the results on standard output, but
in a few cases, it will print output to standard error or generate a file with
the analysis output, which is usually done when the output is meant for another
program.
.sp
While \fI\-analyze\fP is \fInot\fP given, \fBopt\fP attempts to produce an
optimized output file. The optimizations available via \fBopt\fP depend
upon what libraries were linked into it as well as any additional libraries
that have been loaded with the \fI\%\-load\fP option. Use the \fI\%\-help\fP
option to determine what optimizations you can use.
.sp
If \fBfilename\fP is omitted from the command line or is "\fB\-\fP", \fBopt\fP
reads its input from standard input. Inputs can be in either the LLVM assembly
language format (\fB\&.ll\fP) or the LLVM bitcode format (\fB\&.bc\fP).
.sp
If an output filename is not specified with the \fI\%\-o\fP option,
\fBopt\fP writes its output to the standard output.
.SH OPTIONS
.INDENT 0.0
.TP
.B \-f
Enable binary output on terminals. Normally, \fBopt\fP will refuse to
write raw bitcode output if the output stream is a terminal. With this option,
\fBopt\fP will write raw bitcode regardless of the output device.
.UNINDENT
.INDENT 0.0
.TP
.B \-help
Print a summary of command line options.
.UNINDENT
.INDENT 0.0
.TP
.B \-o <filename>
Specify the output filename.
.UNINDENT
.INDENT 0.0
.TP
.B \-S
Write output in LLVM intermediate language (instead of bitcode).
.UNINDENT
.INDENT 0.0
.TP
.B \-{passname}
\fBopt\fP provides the ability to run any of LLVM\(aqs optimization or
analysis passes in any order. The \fI\%\-help\fP option lists all the passes
available. The order in which the options occur on the command line are the
order in which they are executed (within pass constraints).
.UNINDENT
.INDENT 0.0
.TP
.B \-std\-compile\-opts
This is short hand for a standard list of \fIcompile time optimization\fP passes.
This is typically used to optimize the output from the llvm\-gcc front end. It
might be useful for other front end compilers as well. To discover the full
set of options available, use the following command:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
llvm\-as < /dev/null | opt \-std\-compile\-opts \-disable\-output \-debug\-pass=Arguments
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-disable\-inlining
This option is only meaningful when \fI\%\-std\-compile\-opts\fP is given. It
simply removes the inlining pass from the standard list.
.UNINDENT
.INDENT 0.0
.TP
.B \-disable\-opt
This option is only meaningful when \fI\%\-std\-compile\-opts\fP is given. It
disables most, but not all, of the \fI\%\-std\-compile\-opts\fP\&. The ones that
remain are \fI\-verify\fP, \fI\-lower\-setjmp\fP, and
\fI\-funcresolve\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-strip\-debug
This option causes opt to strip debug information from the module before
applying other optimizations. It is essentially the same as \fI\-strip\fP
but it ensures that stripping of debug information is done first.
.UNINDENT
.INDENT 0.0
.TP
.B \-verify\-each
This option causes opt to add a verify pass after every pass otherwise
specified on the command line (including \fI\-verify\fP). This is useful
for cases where it is suspected that a pass is creating an invalid module but
it is not clear which pass is doing it. The combination of
\fI\%\-std\-compile\-opts\fP and \fI\%\-verify\-each\fP can quickly track down
this kind of problem.
.UNINDENT
.INDENT 0.0
.TP
.B \-profile\-info\-file <filename>
Specify the name of the file loaded by the \fB\-profile\-loader\fP option.
.UNINDENT
.INDENT 0.0
.TP
.B \-stats
Print statistics.
.UNINDENT
.INDENT 0.0
.TP
.B \-time\-passes
Record the amount of time needed for each pass and print it to standard
error.
.UNINDENT
.INDENT 0.0
.TP
.B \-debug
If this is a debug build, this option will enable debug printouts from passes
which use the \fBDEBUG()\fP macro. See the \fI\%LLVM Programmer\(aqs Manual\fP, section \fB#DEBUG\fP for more information.
.UNINDENT
.INDENT 0.0
.TP
.B \-load=<plugin>
Load the dynamic object \fBplugin\fP\&. This object should register new
optimization or analysis passes. Once loaded, the object will add new command
line options to enable various optimizations or analyses. To see the new
complete list of optimizations, use the \fI\%\-help\fP and \fI\%\-load\fP
options together. For example:
.INDENT 7.0
.INDENT 3.5
.sp
.nf
.ft C
opt \-load=plugin.so \-help
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-p
Print module after each transformation.
.UNINDENT
.SH EXIT STATUS
.sp
If \fBopt\fP succeeds, it will exit with 0. Otherwise, if an error
occurs, it will exit with a non\-zero value.
.SH AUTHOR
Maintained by The LLVM Team (http://llvm.org/).
.SH COPYRIGHT
2003-2013, LLVM Project
.\" Generated by docutils manpage writer.
.