From 592453413690a2d16784667d1644758b9af700c1 Mon Sep 17 00:00:00 2001 From: Piotr Padlewski Date: Wed, 28 Dec 2016 18:23:23 +0000 Subject: [PATCH] Mention devirtualization in release notes git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290675 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/ReleaseNotes.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 11ee88f4ae..3f25278f32 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -47,6 +47,24 @@ sections with improvements to Clang's support for those languages. Major New Features ------------------ +- Enhanced devirtualization with `-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); + } + + - ... Improvements to Clang's diagnostics -- 2.40.0