Prazek updated this revision to Diff 84491. Prazek added a comment. Added link to documentation
https://reviews.llvm.org/D28606 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst =================================================================== --- docs/ReleaseNotes.rst +++ docs/ReleaseNotes.rst @@ -51,6 +51,24 @@ clang to emit a warning or error if a function call meets one or more user-specified conditions. +- Enhanced devirtualization with + '-fstrict-vtable-pointers <http://clang.llvm.org/docs/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 Clang's diagnostics
Index: docs/ReleaseNotes.rst =================================================================== --- docs/ReleaseNotes.rst +++ docs/ReleaseNotes.rst @@ -51,6 +51,24 @@ clang to emit a warning or error if a function call meets one or more user-specified conditions. +- Enhanced devirtualization with + '-fstrict-vtable-pointers <http://clang.llvm.org/docs/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 Clang's diagnostics
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits