aboutsummaryrefslogtreecommitdiff
path: root/clang/docs/UsersManual.rst
diff options
context:
space:
mode:
Diffstat (limited to 'clang/docs/UsersManual.rst')
-rw-r--r--clang/docs/UsersManual.rst46
1 files changed, 42 insertions, 4 deletions
diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index 5745e4b..e82b16f 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -2325,7 +2325,7 @@ are listed below.
devirtualization and virtual constant propagation, for classes with
:doc:`hidden LTO visibility <LTOVisibility>`. Requires ``-flto``.
-.. option:: -f[no]split-lto-unit
+.. option:: -f[no-]split-lto-unit
Controls splitting the :doc:`LTO unit <LTOVisibility>` into regular LTO and
:doc:`ThinLTO` portions, when compiling with -flto=thin. Defaults to false
@@ -2518,7 +2518,7 @@ are listed below.
.. _funique_internal_linkage_names:
-.. option:: -f[no]-unique-internal-linkage-names
+.. option:: -f[no-]unique-internal-linkage-names
Controls whether Clang emits a unique (best-effort) symbol name for internal
linkage symbols. When this option is set, compiler hashes the main source
@@ -2539,7 +2539,7 @@ are listed below.
$ cd $P/bar && clang -c -funique-internal-linkage-names name_conflict.c
$ cd $P && clang foo/name_conflict.o && bar/name_conflict.o
-.. option:: -f[no]-basic-block-address-map:
+.. option:: -f[no-]basic-block-address-map:
Emits a ``SHT_LLVM_BB_ADDR_MAP`` section which includes address offsets for each
basic block in the program, relative to the parent function address.
@@ -2780,6 +2780,25 @@ usual build cycle when using sample profilers for optimization:
/clang:-fdebug-info-for-profiling /clang:-funique-internal-linkage-names ^
code.cc /Fe:code -fuse-ld=lld /link /debug:dwarf
+ [OPTIONAL] Pseudo instrumentation can be used as the anchor for accurate
+ profile mapping with the ``-fpseudo-probe-for-profiling`` option.
+
+ On Linux:
+
+ .. code-block:: console
+
+ $ clang++ -O2 -gline-tables-only \
+ -fpseudo-probe-for-profiling -funique-internal-linkage-names \
+ code.cc -o code
+
+ On Windows:
+
+ .. code-block:: winbatch
+
+ > clang-cl /O2 -gdwarf -gline-tables-only ^
+ -fpseudo-probe-for-profiling /clang:-funique-internal-linkage-names ^
+ code.cc /Fe:code -fuse-ld=lld /link /debug:dwarf
+
.. note::
:ref:`-funique-internal-linkage-names <funique_internal_linkage_names>`
@@ -2881,6 +2900,25 @@ usual build cycle when using sample profilers for optimization:
/clang:-fdebug-info-for-profiling /clang:-funique-internal-linkage-names ^
-fprofile-sample-use=code.prof code.cc /Fe:code
+ [OPTIONAL] Pseudo instrumentation can be used as the anchor for accurate
+ profile mapping with the ``-fpseudo-probe-for-profiling`` option.
+
+ On Linux:
+
+ .. code-block:: console
+
+ $ clang++ -O2 \
+ -fpseudo-probe-for-profiling -funique-internal-linkage-names \
+ -fprofile-sample-use=code.prof code.cc -o code
+
+ On Windows:
+
+ .. code-block:: winbatch
+
+ > clang-cl /O2 ^
+ -fpseudo-probe-for-profiling /clang:-funique-internal-linkage-names ^
+ -fprofile-sample-use=code.prof code.cc /Fe:code
+
[OPTIONAL] Sampling-based profiles can have inaccuracies or missing block/
edge counters. The profile inference algorithm (profi) can be used to infer
missing blocks and edge counts, and improve the quality of profile data.
@@ -4036,7 +4074,7 @@ Controlling implementation limits
Sets the limit for the number of full-expressions evaluated in a single
constant expression evaluation. This also controls the maximum size
of array and dynamic array allocation that can be constant evaluated.
- The default is 1048576.
+ The default is 1048576, and the limit can be disabled with `-fconstexpr-steps=0`.
.. option:: -ftemplate-depth=N