[llvm-branch-commits] [clang] 8ea504b - Add release node for exact dynamic_cast optimization.

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jul 28 23:41:37 PDT 2023


Author: Richard Smith
Date: 2023-07-29T08:40:05+02:00
New Revision: 8ea504be360bb991918df47ee245912f61fc9a38

URL: https://github.com/llvm/llvm-project/commit/8ea504be360bb991918df47ee245912f61fc9a38
DIFF: https://github.com/llvm/llvm-project/commit/8ea504be360bb991918df47ee245912f61fc9a38.diff

LOG: Add release node for exact dynamic_cast optimization.

Added: 
    

Modified: 
    clang/docs/ReleaseNotes.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index dbf789c1e6c5eb..d4a08062352fa4 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -85,6 +85,12 @@ C++ Language Changes
 - Implemented `CWG2518 <https://wg21.link/CWG2518>`_ which allows ``static_assert(false)``
   to not be ill-formed when its condition is evaluated in the context of a template definition.
 - Declaring namespace std to be an inline namespace is now prohibited, `[namespace.std]p7`.
+- Improved code generation for ``dynamic_cast`` to a ``final`` type. Instead of
+  dispatching to the runtime library to compare the RTTI data, Clang now
+  generates a direct comparison of the vtable pointer in cases where the ABI
+  requires the vtable for a class to be unique. This optimization can be
+  disabled with ``-fno-assume-unique-vtables``. This optimization is not yet
+  implemented for the MS C++ ABI.
 
 C++20 Feature Support
 ^^^^^^^^^^^^^^^^^^^^^
@@ -279,6 +285,8 @@ New Compiler Flags
   and thread-local variables—to guarantee that they can be directly addressed.
   Since this inhibits the merging of the affected variables, the number of
   individual relocations in the program will generally increase.
+- ``-f[no-]assume-unique-vtables`` controls whether Clang assumes that each
+  class has a unique vtable address, when that is required by the ABI.
 
 Deprecated Compiler Flags
 -------------------------


        


More information about the llvm-branch-commits mailing list