aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/CommandGuide/llvm-cxxfilt.rst5
-rw-r--r--llvm/docs/DeveloperPolicy.rst49
-rw-r--r--llvm/docs/GettingInvolved.rst8
-rw-r--r--llvm/docs/HowToCrossCompileBuiltinsOnArm.rst30
-rw-r--r--llvm/docs/HowToReleaseLLVM.rst8
-rw-r--r--llvm/docs/HowToSubmitABug.rst46
-rw-r--r--llvm/docs/ReleaseNotes.md4
7 files changed, 101 insertions, 49 deletions
diff --git a/llvm/docs/CommandGuide/llvm-cxxfilt.rst b/llvm/docs/CommandGuide/llvm-cxxfilt.rst
index 8c61ced..8e509ce 100644
--- a/llvm/docs/CommandGuide/llvm-cxxfilt.rst
+++ b/llvm/docs/CommandGuide/llvm-cxxfilt.rst
@@ -54,8 +54,7 @@ OPTIONS
.. option:: --no-strip-underscore, -n
- Do not strip a leading underscore. This is the default for all platforms
- except Mach-O based hosts.
+ Do not strip a leading underscore. This is the default for all platforms.
.. option:: --quote
@@ -64,7 +63,7 @@ OPTIONS
.. option:: --strip-underscore, -_
Strip a single leading underscore, if present, from each input name before
- demangling. On by default on Mach-O based platforms.
+ demangling.
.. option:: --types, -t
diff --git a/llvm/docs/DeveloperPolicy.rst b/llvm/docs/DeveloperPolicy.rst
index 45f2df2..9135406 100644
--- a/llvm/docs/DeveloperPolicy.rst
+++ b/llvm/docs/DeveloperPolicy.rst
@@ -1189,6 +1189,55 @@ Suggested disclaimer for the project README and the main project web page:
necessarily a reflection of the completeness or stability of the code, it
does indicate that the project is not yet endorsed as a component of LLVM.
+Adding or enabling a new LLVM pass
+----------------------------------
+
+The guidelines here are primarily targeted at the enablement of new major
+passes in the target-independent optimization pipeline. Small additions, or
+backend-specific passes, require a lesser degree of care. Before creating a new
+pass, consider whether the functionality can be integrated into an existing
+pass first. This is often both faster and more powerful.
+
+When adding a new pass, the goal should be to enable it as part of the default
+optimization pipeline as early as possible and then continue development
+incrementally. (This does not apply to passes that are only relevant for
+specific uses of LLVM, such as GC support passes.)
+
+The recommended workflow is:
+
+1. Implement a basic version of the pass and add it to the pass pipeline behind
+ a flag that is disabled by default. The initial version should focus on
+ handling simple cases correctly and efficiently.
+2. Enable the pass by default. Separating this step allows easily disabling the
+ pass if issues are encountered, without having to revert the entire
+ implementation.
+3. Incrementally extend the pass with new functionality. As the pass is already
+ enabled, it becomes easier to identify the specific change that has caused a
+ regression in correctness, optimization quality or compile-time.
+
+When enabling a pass, certain requirements must be met (in no particular order):
+
+ * **Maintenance:** The pass (and any analyses it depends on) must have at
+ least one maintainer.
+ * **Usefulness:** There should be evidence that the pass improves performance
+ (or whatever metric it optimizes for) on real-world workloads. Improvements
+ seen only on synthetic benchmarks may be insufficient.
+ * **Compile-Time:** The pass should not have a large impact on compile-time,
+ where the evaluation of what "large" means is up to reviewer discretion, and
+ may differ based on the value the pass provides. In any case, it is expected
+ that a concerted effort has been made to mitigate the compile-time impact,
+ both for the average case, and for pathological cases.
+ * **Correctness:** The pass should have no known correctness issues (except
+ global correctness issues that affect all of LLVM). If an old pass is being
+ enabled (rather than implementing a new one incrementally), additional due
+ diligence is required. The pass should be fully reviewed to ensure that it
+ still complies with current quality standards. Fuzzing with disabled
+ profitability checks may help gain additional confidence in the
+ implementation.
+
+If non-trivial issues are found in a newly enabled pass, it may be temporarily
+disabled again, until the issues have been resolved.
+
.. _copyright-license-patents:
Copyright, License, and Patents
diff --git a/llvm/docs/GettingInvolved.rst b/llvm/docs/GettingInvolved.rst
index 4b4b09a..039d616 100644
--- a/llvm/docs/GettingInvolved.rst
+++ b/llvm/docs/GettingInvolved.rst
@@ -223,6 +223,10 @@ what to add to your calendar invite.
- `ics <https://calendar.google.com/calendar/ical/c_673c6cd64474c0aff173bf8fa609559f93d654e0984d9d91d71abd32d28c0486%40group.calendar.google.com/public/basic.ics>`__
`gcal <https://calendar.google.com/calendar/embed?src=c_673c6cd64474c0aff173bf8fa609559f93d654e0984d9d91d71abd32d28c0486%40group.calendar.google.com&ctz=America%2FLos_Angeles>`__
-
+ * - GlobalISel
+ - Every 2nd Tuesday of the month
+ - `gcal <https://calendar.google.com/calendar/u/0?cid=ZDcyMjc0ZjZiZjNhMzFlYmE3NTNkMWM2MGM2NjM5ZWU3ZDE2MjM4MGFlZDc2ZjViY2UyYzMwNzVhZjk4MzQ4ZEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t>`__
+ - `Meeting details/agenda <https://docs.google.com/document/d/1Ry8O4-Tm5BFj9AMjr8qTQFU80z-ptiNQ62687NaIvLs/edit?usp=sharing>`__
For event owners, our Discord bot also supports sending automated announcements
@@ -254,10 +258,6 @@ the future.
- `ics <https://calendar.google.com/calendar/ical/c_1mincouiltpa24ac14of14lhi4%40group.calendar.google.com/public/basic.ics>`__
`gcal <https://calendar.google.com/calendar/embed?src=c_1mincouiltpa24ac14of14lhi4%40group.calendar.google.com>`__
- `Minutes/docs <https://docs.google.com/document/d/1-uEEZfmRdPThZlctOq9eXlmUaSSAAi8oKxhrPY_lpjk/edit#>`__
- * - GlobalISel
- - Every 2nd Tuesday of the month
- - `gcal <https://calendar.google.com/calendar/u/0?cid=ZDcyMjc0ZjZiZjNhMzFlYmE3NTNkMWM2MGM2NjM5ZWU3ZDE2MjM4MGFlZDc2ZjViY2UyYzMwNzVhZjk4MzQ4ZEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t>`__
- - `Meeting details/agenda <https://docs.google.com/document/d/1Ry8O4-Tm5BFj9AMjr8qTQFU80z-ptiNQ62687NaIvLs/edit?usp=sharing>`__
* - Vector Predication
- Every 2 weeks on Tuesdays, 3pm UTC
-
diff --git a/llvm/docs/HowToCrossCompileBuiltinsOnArm.rst b/llvm/docs/HowToCrossCompileBuiltinsOnArm.rst
index d7759ad..5859940 100644
--- a/llvm/docs/HowToCrossCompileBuiltinsOnArm.rst
+++ b/llvm/docs/HowToCrossCompileBuiltinsOnArm.rst
@@ -8,18 +8,18 @@ Introduction
This document contains information about building and testing the builtins part
of compiler-rt for an Arm target, from an x86_64 Linux machine.
-While this document concentrates on Arm and Linux the general principles should
+While this document concentrates on Arm and Linux, the general principles should
apply to other targets supported by compiler-rt. Further contributions for other
targets are welcome.
The instructions in this document depend on libraries and programs external to
-LLVM, there are many ways to install and configure these dependencies so you
+LLVM. There are many ways to install and configure these dependencies, so you
may need to adapt the instructions here to fit your own situation.
Prerequisites
=============
-In this use case we will be using cmake on a Debian-based Linux system,
+In this use case, we will be using cmake on a Debian-based Linux system,
cross-compiling from an x86_64 host to a hard-float Armv7-A target. We will be
using as many of the LLVM tools as we can, but it is possible to use GNU
equivalents.
@@ -35,7 +35,7 @@ You will need:
An existing sysroot is required because some of the builtins include C library
headers and a sysroot is the easiest way to get those.
-In this example we will be using ``ninja`` as the build tool.
+In this example, we will be using ``ninja`` as the build tool.
See https://compiler-rt.llvm.org/ for information about the dependencies
on clang and LLVM.
@@ -46,7 +46,7 @@ the source for LLVM and compiler-rt.
``qemu-arm`` should be available as a package for your Linux distribution.
The most complicated of the prerequisites to satisfy is the ``arm-linux-gnueabihf``
-sysroot. In theory it is possible to use the Linux distributions multiarch
+sysroot. In theory, it is possible to use the Linux distributions multiarch
support to fulfill the dependencies for building but unfortunately due to
``/usr/local/include`` being added some host includes are selected.
@@ -153,7 +153,7 @@ The cmake try compile stage fails
At an early stage cmake will attempt to compile and link a simple C program to
test if the toolchain is working.
-This stage can often fail at link time if the ``--sysroot=``, ``--target`` or
+This stage can often fail at link time if the ``--sysroot=``, ``--target``, or
``--gcc-toolchain=`` options are not passed to the compiler. Check the
``CMAKE_<LANGUAGE>_FLAGS`` and ``CMAKE_<LANGAUGE>_COMPILER_TARGET`` flags along
with any of the specific CMake sysroot and toolchain options.
@@ -165,7 +165,7 @@ to make sure it is working. For example::
Clang uses the host header files
--------------------------------
-On debian based systems it is possible to install multiarch support for
+On Debian-based systems, it is possible to install multiarch support for
``arm-linux-gnueabi`` and ``arm-linux-gnueabihf``. In many cases clang can successfully
use this multiarch support when ``--gcc-toolchain=`` and ``--sysroot=`` are not supplied.
Unfortunately clang adds ``/usr/local/include`` before
@@ -177,8 +177,8 @@ use a separate ``arm-linux-gnueabihf`` toolchain.
No target passed to clang
-------------------------
-If clang is not given a target it will typically use the host target, this will
-not understand the Arm assembly language files resulting in error messages such
+If clang is not given a target, it will typically use the host target. This will
+not understand the Arm assembly language files, resulting in error messages such
as ``error: unknown directive .syntax unified``.
You can check the clang invocation in the error message to see if there is no
@@ -217,7 +217,7 @@ target to use is:
* ``-DCMAKE_C_COMPILER_TARGET=arm-linux-gnueabi``
-Depending on whether you want to use floating point instructions or not you
+Depending on whether you want to use floating point instructions or not, you
may need extra c-flags such as ``-mfloat-abi=softfp`` for use of floating-point
instructions, and ``-mfloat-abi=soft -mfpu=none`` for software floating-point
emulation.
@@ -241,7 +241,7 @@ To build and test the libraries using a similar method to Armv7-A is possible
but more difficult. The main problems are:
* There is not a ``qemu-arm`` user-mode emulator for bare-metal systems.
- ``qemu-system-arm`` can be used but this is significantly more difficult
+ ``qemu-system-arm`` can be used, but this is significantly more difficult
to setup. This document does not explain how to do this.
* The targets to compile compiler-rt have the suffix ``-none-eabi``. This uses
the BareMetal driver in clang and by default will not find the libraries
@@ -252,8 +252,8 @@ that are supported on Armv7-A we can still get most of the value of running the
tests using the same ``qemu-arm`` that we used for Armv7-A by building and
running the test cases for Armv7-A but using the builtins compiled for
Armv6-M, Armv7-M or Armv7E-M. This will test that the builtins can be linked
-into a binary and execute the tests correctly but it will not catch if the
-builtins use instructions that are supported on Armv7-A but not Armv6-M,
+into a binary and execute the tests correctly, but it will not catch if the
+builtins use instructions that are supported on Armv7-A but not on Armv6-M,
Armv7-M and Armv7E-M.
This requires a second ``arm-none-eabi`` toolchain for building the builtins.
@@ -321,9 +321,9 @@ command for Armv7-A build and test::
The Armv6-M builtins will use the soft-float ABI. When compiling the tests for
Armv7-A we must include ``"-mthumb -mfloat-abi=soft -mfpu=none"`` in the
-test-c-flags. We must use an Armv7-A soft-float abi sysroot for ``qemu-arm``.
+test-c-flags. We must use an Armv7-A soft-float ABI sysroot for ``qemu-arm``.
-Depending on the linker used for the test cases you may encounter BuildAttribute
+Depending on the linker used for the test cases, you may encounter BuildAttribute
mismatches between the M-profile objects from compiler-rt and the A-profile
objects from the test. The lld linker does not check the profile
BuildAttribute so it can be used to link the tests by adding ``-fuse-ld=lld`` to the
diff --git a/llvm/docs/HowToReleaseLLVM.rst b/llvm/docs/HowToReleaseLLVM.rst
index 171bf88..c269cc4 100644
--- a/llvm/docs/HowToReleaseLLVM.rst
+++ b/llvm/docs/HowToReleaseLLVM.rst
@@ -311,10 +311,10 @@ This section describes how to triage bug reports:
to backport. You should also review the bug yourself to ensure that it
meets the requirements for committing to the release branch.
-#. Once a bug has been reviewed, add the release:reviewed label and update the
- issue's status to "Needs Merge". Check the pull request associated with the
- issue. If all the tests pass, then the pull request can be merged. If not,
- then add a comment on the issue asking someone to take a look at the failures.
+#. Once a bug has been reviewed, update the status to "Needs Merge". Check the
+ pull request associated with the issue. If all the tests pass, then the pull
+ request can be merged. If not, then add a comment on the issue asking
+ someone to take a look at the failures.
Release Patch Rules
diff --git a/llvm/docs/HowToSubmitABug.rst b/llvm/docs/HowToSubmitABug.rst
index 002087c..d62391b 100644
--- a/llvm/docs/HowToSubmitABug.rst
+++ b/llvm/docs/HowToSubmitABug.rst
@@ -6,26 +6,26 @@ Introduction - Got bugs?
========================
-If you're working with LLVM and run into a bug, we definitely want to know
+If you're working with LLVM and encounter a bug, we definitely want to know
about it. This document describes what you can do to increase the odds of
getting it fixed quickly.
🔒 If you believe that the bug is security related, please follow :ref:`report-security-issue`. 🔒
-Basically you have to do two things at a minimum. First, decide whether the
+Basically, you have to do two things at a minimum. First, decide whether the
bug `crashes the compiler`_ or if the compiler is `miscompiling`_ the program
(i.e., the compiler successfully produces an executable, but it doesn't run
right). Based on what type of bug it is, follow the instructions in the
linked section to narrow down the bug so that the person who fixes it will be
able to find the problem more easily.
-Once you have a reduced test-case, go to `the LLVM Bug Tracking System
+Once you have a reduced test case, go to `the LLVM Bug Tracking System
<https://github.com/llvm/llvm-project/issues>`_ and fill out the form with the
necessary details (note that you don't need to pick a label, just use if you're
not sure). The bug description should contain the following information:
* All information necessary to reproduce the problem.
-* The reduced test-case that triggers the bug.
+* The reduced test case that triggers the bug.
* The location where you obtained LLVM (if not from our Git
repository).
@@ -39,10 +39,10 @@ Crashing Bugs
More often than not, bugs in the compiler cause it to crash---often due to
an assertion failure of some sort. The most important piece of the puzzle
is to figure out if it is crashing in the Clang front-end or if it is one of
-the LLVM libraries (e.g. the optimizer or code generator) that has
+the LLVM libraries (e.g., the optimizer or code generator) that has
problems.
-To figure out which component is crashing (the front-end, middle-end
+To identify the crashing component (the front-end, middle-end
optimizer, or backend code generator), run the ``clang`` command line as you
were when the crash occurred, but with the following extra command line
options:
@@ -53,7 +53,7 @@ options:
<frontend-crash>`.
* ``-emit-llvm``: If ``clang`` crashes with this option (which disables
- the code generator), you found a middle-end optimizer bug. Jump ahead to
+ the code generator), you've found a middle-end optimizer bug. Jump ahead to
:ref:`middle-end bugs <middleend-crash>`.
* Otherwise, you have a backend code generator crash. Jump ahead to :ref:`code
@@ -102,19 +102,19 @@ functions. Then run:
If this doesn't crash, please follow the instructions for a :ref:`front-end
bug <frontend-crash>`.
-If this does crash, then you should be able to debug this with the following
+If this does crash, then you can debug this with the following
:doc:`bugpoint <Bugpoint>` command:
.. code-block:: bash
bugpoint foo.bc -O3
-Run this, then file a bug with the instructions and reduced .bc
+Run this, then file a bug with the instructions and reduced ``.bc``
files that bugpoint emits.
If bugpoint doesn't reproduce the crash,
:doc:`llvm-reduce <CommandGuide/llvm-reduce>` is an alternative way to reduce
-LLVM IR. Create a script that repros the crash and run:
+LLVM IR. Create a script that reproduces the crash and run:
.. code-block:: bash
@@ -137,16 +137,16 @@ Backend code generator bugs
---------------------------
If you find a bug that crashes clang in the code generator, compile your
-source file to a .bc file by passing "``-emit-llvm -c -o foo.bc``" to
-clang (in addition to the options you already pass). Once your have
-foo.bc, one of the following commands should fail:
+source file to a ``.bc`` file by passing "``-emit-llvm -c -o foo.bc``" to
+clang (in addition to the options you already pass). Once you have
+``foo.bc``, one of the following commands should fail:
#. ``llc foo.bc``
#. ``llc foo.bc -relocation-model=pic``
#. ``llc foo.bc -relocation-model=static``
If none of these crash, please follow the instructions for a :ref:`front-end
-bug<frontend-crash>`. If one of these do crash, you should be able to reduce
+bug<frontend-crash>`. If one of these crashes, you should be able to reduce
this with one of the following :doc:`bugpoint <Bugpoint>` command lines (use
the one corresponding to the command above that failed):
@@ -154,9 +154,9 @@ the one corresponding to the command above that failed):
#. ``bugpoint -run-llc foo.bc --tool-args -relocation-model=pic``
#. ``bugpoint -run-llc foo.bc --tool-args -relocation-model=static``
-Please run this, then file a bug with the instructions and reduced .bc file
+Please run this, then file a bug with the instructions and reduced ``.bc`` file
that bugpoint emits. If something goes wrong with bugpoint, please submit
-the "foo.bc" file and the option that llc crashes with.
+the ``foo.bc`` file and the option that llc crashes with.
LTO bugs
---------------------------
@@ -174,7 +174,7 @@ in addition to your existing compilation options:
These options enable LTO and save temporary files generated during compilation
for later analysis.
-On Windows, you should be using lld-link as the linker. Adjust your compilation
+On Windows, use lld-link as the linker. Adjust your compilation
flags as follows:
* Add ``/lldsavetemps`` to the linker flags.
* When linking from the compiler driver, add ``/link /lldsavetemps`` in order to forward that flag to the linker.
@@ -199,7 +199,7 @@ command line (use the bc file corresponding to the command above that failed):
llvm-reduce --test reduce.sh a.out.0.2.internalize.bc
-Example of reduce.sh script
+Example of ``reduce.sh`` script
.. code-block:: bash
@@ -209,9 +209,9 @@ Example of reduce.sh script
path/to/not --crash path/to/opt "-passes=lto<O3>" $1 -o temp.bc 2> err.log
grep -q "It->second == &Insn" err.log
-Here we have grepped the failed assert message.
+Here we have grepped for the failed assert message.
-Please run this, then file a bug with the instructions and reduced .bc file
+Please run this, then file a bug with the instructions and reduced ``.bc`` file
that llvm-reduce emits.
.. _miscompiling:
@@ -221,16 +221,16 @@ Miscompilations
If clang successfully produces an executable, but that executable doesn't run
right, this is either a bug in the code or a bug in the compiler. The first
-thing to check is to make sure it is not using undefined behavior (e.g.
+thing to check is to make sure it is not using undefined behavior (e.g.,
reading a variable before it is defined). In particular, check to see if the
program is clean under various `sanitizers
-<https://github.com/google/sanitizers>`_ (e.g. ``clang
+<https://github.com/google/sanitizers>`_ (e.g., ``clang
-fsanitize=undefined,address``) and `valgrind <http://valgrind.org/>`_. Many
"LLVM bugs" that we have chased down ended up being bugs in the program being
compiled, not LLVM.
Once you determine that the program itself is not buggy, you should choose
-which code generator you wish to compile the program with (e.g. LLC or the JIT)
+which code generator you wish to compile the program with (e.g., LLC or the JIT)
and optionally a series of LLVM passes to run. For example:
.. code-block:: bash
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index 36383b1..49158fb 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -191,6 +191,10 @@ Changes to LLDB
* The `show-progress` setting, which became a NOOP with the introduction of the
statusline, now defaults to off and controls using OSC escape codes to show a
native progress bar in supporting terminals like Ghostty and ConEmu.
+* The default PDB reader on Windows was changed from DIA to native, which uses
+ LLVM's PDB and CodeView support. You can switch back to the DIA reader with
+ `settings set plugin.symbol-file.pdb.reader dia`. Note that support for the
+ DIA reader will be removed in a future version of LLDB.
Changes to BOLT
---------------------------------