summaryrefslogtreecommitdiffstats
path: root/clang/docs
diff options
context:
space:
mode:
authorPiotr Padlewski <piotr.padlewski@gmail.com>2018-06-13 13:55:42 +0000
committerPiotr Padlewski <piotr.padlewski@gmail.com>2018-06-13 13:55:42 +0000
commite368de364e1fa1dcd0f67a5fbb5ae5cbb0adae65 (patch)
tree287bb854ba52a5cf2b6baa239b16e6c2c3e0ec9e /clang/docs
parent60e3d582f664486507119dc2b7fc3a876b065664 (diff)
downloadbcm5719-llvm-e368de364e1fa1dcd0f67a5fbb5ae5cbb0adae65.tar.gz
bcm5719-llvm-e368de364e1fa1dcd0f67a5fbb5ae5cbb0adae65.zip
Add -fforce-emit-vtables
Summary: In many cases we can't devirtualize because definition of vtable is not present. Most of the time it is caused by inline virtual function not beeing emitted. Forcing emitting of vtable adds a reference of these inline virtual functions. Note that GCC was always doing it. Reviewers: rjmccall, rsmith, amharc, kuhar Subscribers: llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D47108 Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com> llvm-svn: 334600
Diffstat (limited to 'clang/docs')
-rw-r--r--clang/docs/ClangCommandLineReference.rst6
-rw-r--r--clang/docs/ReleaseNotes.rst6
-rw-r--r--clang/docs/UsersManual.rst6
3 files changed, 18 insertions, 0 deletions
diff --git a/clang/docs/ClangCommandLineReference.rst b/clang/docs/ClangCommandLineReference.rst
index 264729dd0f1..513128119e2 100644
--- a/clang/docs/ClangCommandLineReference.rst
+++ b/clang/docs/ClangCommandLineReference.rst
@@ -1934,6 +1934,12 @@ Set the default symbol visibility for all global declarations
Enables whole-program vtable optimization. Requires -flto
+.. option:: -fforce-emit-vtables, -fno-force-emit-vtables
+
+In order to improve devirtualization, forces emitting of vtables even in
+modules where it isn't necessary. It causes more inline virtual functions
+to be emitted.
+
.. option:: -fwrapv, -fno-wrapv
Treat signed integer overflow as two's complement
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 84145554647..15ae73e859e 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -112,6 +112,12 @@ New Compiler Flags
'no-strict' option, Clang attempts to match the overflowing behavior of the
target's native float-to-int conversion instructions.
+- :option: `-fforce-emit-vtables` and `-fno-force-emit-vtables`.
+
+ In order to improve devirtualization, forces emitting of vtables even in
+ modules where it isn't necessary. It causes more inline virtual functions
+ to be emitted.
+
- ...
Deprecated Compiler Flags
diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index 9778b1654de..b1c286193cf 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -1269,6 +1269,12 @@ are listed below.
devirtualization and virtual constant propagation, for classes with
:doc:`hidden LTO visibility <LTOVisibility>`. Requires ``-flto``.
+.. option:: -fforce-emit-vtables
+
+ In order to improve devirtualization, forces emitting of vtables even in
+ modules where it isn't necessary. It causes more inline virtual functions
+ to be emitted.
+
.. option:: -fno-assume-sane-operator-new
Don't assume that the C++'s new operator is sane.
OpenPOWER on IntegriCloud