summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/AttributeReference.rst1
-rw-r--r--docs/ReleaseNotes.rst27
-rw-r--r--docs/UsersManual.rst10
3 files changed, 37 insertions, 1 deletions
diff --git a/docs/AttributeReference.rst b/docs/AttributeReference.rst
index d7a3f74f83fb..db4812afdaa0 100644
--- a/docs/AttributeReference.rst
+++ b/docs/AttributeReference.rst
@@ -456,6 +456,7 @@ warnings or errors at compile-time if calls to the attributed function meet
certain user-defined criteria. For example:
.. code-block:: c
+
void abs(int a)
__attribute__((diagnose_if(a >= 0, "Redundant abs call", "warning")));
void must_abs(int a)
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index 5b035cd3320f..25ea577ba519 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -46,8 +46,35 @@ Major New Features
clang to emit a warning or error if a function call meets one or more
user-specified conditions.
+- Enhanced devirtualization with
+ `-fstrict-vtable-pointers <UsersManual.html#cmdoption-fstrict-vtable-pointers>`_.
+ Clang devirtualizes across different basic blocks, like loops:
+
+ .. code-block:: c++
+
+ struct A {
+ virtual void foo();
+ };
+ void indirect(A &a, int n) {
+ for (int i = 0 ; i < n; i++)
+ a.foo();
+ }
+ void test(int n) {
+ A a;
+ indirect(a, n);
+ }
+
+
- ...
+Improvements to ThinLTO (-flto=thin)
+------------------------------------
+- Integration with profile data (PGO). When available, profile data enables
+ more accurate function importing decisions, as well as cross-module indirect
+ call promotion.
+- Significant build-time and binary-size improvements when compiling with debug
+ info (-g).
+
Improvements to Clang's diagnostics
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/docs/UsersManual.rst b/docs/UsersManual.rst
index 3adbfe059f89..04023dd20602 100644
--- a/docs/UsersManual.rst
+++ b/docs/UsersManual.rst
@@ -1097,6 +1097,14 @@ are listed below.
the behavior of sanitizers in the ``cfi`` group to allow checking
of cross-DSO virtual and indirect calls.
+
+.. option:: -fstrict-vtable-pointers
+
+ Enable optimizations based on the strict rules for overwriting polymorphic
+ C++ objects, i.e. the vptr is invariant during an object's lifetime.
+ This enables better devirtualization. Turned off by default, because it is
+ still experimental.
+
.. option:: -ffast-math
Enable fast-math mode. This defines the ``__FAST_MATH__`` preprocessor
@@ -2645,7 +2653,7 @@ Execute ``clang-cl /?`` to see a list of supported options:
(overridden by LLVM_PROFILE_FILE env var)
-fprofile-instr-generate
Generate instrumented code to collect execution counts into default.profraw file
- (overriden by '=' form of option or LLVM_PROFILE_FILE env var)
+ (overridden by '=' form of option or LLVM_PROFILE_FILE env var)
-fprofile-instr-use=<value>
Use instrumentation data for profile-guided optimization
-fsanitize-blacklist=<value>