summaryrefslogtreecommitdiff
path: root/docs/CommandGuide
diff options
context:
space:
mode:
Diffstat (limited to 'docs/CommandGuide')
-rw-r--r--docs/CommandGuide/FileCheck.rst36
-rw-r--r--docs/CommandGuide/bugpoint.rst17
-rw-r--r--docs/CommandGuide/lit.rst29
-rw-r--r--docs/CommandGuide/llvm-cov.rst20
-rw-r--r--docs/CommandGuide/llvm-nm.rst5
-rw-r--r--docs/CommandGuide/llvm-profdata.rst24
-rw-r--r--docs/CommandGuide/llvm-readobj.rst4
7 files changed, 129 insertions, 6 deletions
diff --git a/docs/CommandGuide/FileCheck.rst b/docs/CommandGuide/FileCheck.rst
index 03c8829767760..a0ca1bfe52f92 100644
--- a/docs/CommandGuide/FileCheck.rst
+++ b/docs/CommandGuide/FileCheck.rst
@@ -38,10 +38,27 @@ OPTIONS
prefixes to match. Multiple prefixes are useful for tests which might
change for different run options, but most lines remain the same.
+.. option:: --check-prefixes prefix1,prefix2,...
+
+ An alias of :option:`--check-prefix` that allows multiple prefixes to be
+ specified as a comma separated list.
+
.. option:: --input-file filename
File to check (defaults to stdin).
+.. option:: --match-full-lines
+
+ By default, FileCheck allows matches of anywhere on a line. This
+ option will require all positive matches to cover an entire
+ line. Leading and trailing whitespace is ignored, unless
+ :option:`--strict-whitespace` is also specified. (Note: negative
+ matches from ``CHECK-NOT`` are not affected by this option!)
+
+ Passing this option is equivalent to inserting ``{{^ *}}`` or
+ ``{{^}}`` before, and ``{{ *$}}`` or ``{{$}}`` after every positive
+ check pattern.
+
.. option:: --strict-whitespace
By default, FileCheck canonicalizes input horizontal whitespace (spaces and
@@ -444,3 +461,22 @@ relative line number references, for example:
// CHECK-NEXT: {{^ ;}}
int a
+Matching Newline Characters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To match newline characters in regular expressions the character class
+``[[:space:]]`` can be used. For example, the following pattern:
+
+.. code-block:: c++
+
+ // CHECK: DW_AT_location [DW_FORM_sec_offset] ([[DLOC:0x[0-9a-f]+]]){{[[:space:]].*}}"intd"
+
+matches output of the form (from llvm-dwarfdump):
+
+.. code-block:: llvm
+
+ DW_AT_location [DW_FORM_sec_offset] (0x00000233)
+ DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000c9] = "intd")
+
+letting us set the :program:`FileCheck` variable ``DLOC`` to the desired value
+``0x00000233``, extracted from the line immediately preceding "``intd``".
diff --git a/docs/CommandGuide/bugpoint.rst b/docs/CommandGuide/bugpoint.rst
index f11585d359c65..8c2a0d124981b 100644
--- a/docs/CommandGuide/bugpoint.rst
+++ b/docs/CommandGuide/bugpoint.rst
@@ -15,7 +15,7 @@ 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 **bugpoint**, as well as
-advice for using bugpoint, see *llvm/docs/Bugpoint.html* in the LLVM
+advice for using bugpoint, see :doc:`/Bugpoint` in the LLVM
distribution.
OPTIONS
@@ -151,7 +151,12 @@ OPTIONS
**--compile-command** *command*
This option defines the command to use with the **--compile-custom**
- option to compile the bitcode testcase. This can be useful for
+ 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).
+
+ 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:
@@ -171,6 +176,14 @@ OPTIONS
**--safe-{int,jit,llc,custom}**
option.
+**--verbose-errors**\ =\ *{true,false}*
+
+ 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.
+
EXIT STATUS
-----------
diff --git a/docs/CommandGuide/lit.rst b/docs/CommandGuide/lit.rst
index 0ec14bb2236ea..b2da58ec02c13 100644
--- a/docs/CommandGuide/lit.rst
+++ b/docs/CommandGuide/lit.rst
@@ -355,6 +355,35 @@ be used to define subdirectories of optional tests, or to change other
configuration parameters --- for example, to change the test format, or the
suffixes which identify test files.
+PRE-DEFINED SUBSTITUTIONS
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:program:`lit` provides various patterns that can be used with the RUN command.
+These are defined in TestRunner.py.
+
+ ========== ==============
+ Macro Substitution
+ ========== ==============
+ %s source path (path to the file currently being run)
+ %S source dir (directory of the file currently being run)
+ %p same as %S
+ %{pathsep} path separator
+ %t temporary file name unique to the test
+ %T temporary directory unique to the test
+ %% %
+ %/s same as %s but replace all / with \\
+ %/S same as %S but replace all / with \\
+ %/p same as %p but replace all / with \\
+ %/t same as %t but replace all / with \\
+ %/T same as %T but replace all / with \\
+ ========== ==============
+
+Further substitution patterns might be defined by each test module.
+See the modules :ref:`local-configuration-files`.
+
+More information on the testing infrastucture can be found in the
+:doc:`../TestingGuide`.
+
TEST RUN OUTPUT FORMAT
~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/CommandGuide/llvm-cov.rst b/docs/CommandGuide/llvm-cov.rst
index d0e78a9a1d11f..946b125a4529f 100644
--- a/docs/CommandGuide/llvm-cov.rst
+++ b/docs/CommandGuide/llvm-cov.rst
@@ -236,6 +236,26 @@ OPTIONS
Show code coverage only for functions that match the given regular expression.
+.. option:: -format=<FORMAT>
+
+ Use the specified output format. The supported formats are: "text", "html".
+
+.. option:: -output-dir=PATH
+
+ Specify a directory to write coverage reports into. If the directory does not
+ exist, it is created. When used in function view mode (i.e when -name or
+ -name-regex are used to select specific functions), the report is written to
+ PATH/functions.EXTENSION. When used in file view mode, a report for each file
+ is written to PATH/REL_PATH_TO_FILE.EXTENSION.
+
+.. option:: -Xdemangler=<TOOL>|<TOOL-OPTION>
+
+ Specify a symbol demangler. This can be used to make reports more
+ human-readable. This option can be specified multiple times to supply
+ arguments to the demangler (e.g `-Xdemangler c++filt -Xdemangler -n` for C++).
+ The demangler is expected to read a newline-separated list of symbols from
+ stdin and write a newline-separated list of the same length to stdout.
+
.. option:: -line-coverage-gt=<N>
Show code coverage only for functions with line coverage greater than the
diff --git a/docs/CommandGuide/llvm-nm.rst b/docs/CommandGuide/llvm-nm.rst
index 83d9fbaf9e8cc..f666e1c35e35d 100644
--- a/docs/CommandGuide/llvm-nm.rst
+++ b/docs/CommandGuide/llvm-nm.rst
@@ -126,6 +126,11 @@ OPTIONS
Print only symbols referenced but not defined in this file.
+.. option:: --radix=RADIX, -t
+
+ Specify the radix of the symbol address(es). Values accepted d(decimal),
+ x(hexadecomal) and o(octal).
+
BUGS
----
diff --git a/docs/CommandGuide/llvm-profdata.rst b/docs/CommandGuide/llvm-profdata.rst
index 74fe4ee9d2194..f5508b5b2b8f2 100644
--- a/docs/CommandGuide/llvm-profdata.rst
+++ b/docs/CommandGuide/llvm-profdata.rst
@@ -44,6 +44,9 @@ interpreted as relatively more important than a shorter run. Depending on the
nature of the training runs it may be useful to adjust the weight given to each
input file by using the ``-weighted-input`` option.
+Profiles passed in via ``-weighted-input``, ``-input-files``, or via positional
+arguments are processed once for each time they are seen.
+
OPTIONS
^^^^^^^
@@ -59,10 +62,17 @@ OPTIONS
.. option:: -weighted-input=weight,filename
- Specify an input file name along with a weight. The profile counts of the input
- file will be scaled (multiplied) by the supplied ``weight``, where where ``weight``
- is a decimal integer >= 1. Input files specified without using this option are
- assigned a default weight of 1. Examples are shown below.
+ Specify an input file name along with a weight. The profile counts of the
+ supplied ``filename`` will be scaled (multiplied) by the supplied
+ ``weight``, where where ``weight`` is a decimal integer >= 1.
+ Input files specified without using this option are assigned a default
+ weight of 1. Examples are shown below.
+
+.. option:: -input-files=path, -f=path
+
+ Specify a file which contains a list of files to merge. The entries in this
+ file are newline-separated. Lines starting with '#' are skipped. Entries may
+ be of the form <filename> or <weight>,<filename>.
.. option:: -instr (default)
@@ -90,6 +100,12 @@ OPTIONS
Emit the profile using GCC's gcov format (Not yet supported).
+.. option:: -sparse[=true|false]
+
+ Do not emit function records with 0 execution count. Can only be used in
+ conjunction with -instr. Defaults to false, since it can inhibit compiler
+ optimization during PGO.
+
EXAMPLES
^^^^^^^^
Basic Usage
diff --git a/docs/CommandGuide/llvm-readobj.rst b/docs/CommandGuide/llvm-readobj.rst
index b1918b548f856..417fcd05c8a20 100644
--- a/docs/CommandGuide/llvm-readobj.rst
+++ b/docs/CommandGuide/llvm-readobj.rst
@@ -80,6 +80,10 @@ input. Otherwise, it will read from the specified ``filenames``.
Display the ELF program headers (only for ELF object files).
+.. option:: -elf-section-groups, -g
+
+ Display section groups (only for ELF object files).
+
EXIT STATUS
-----------