Skip to content
Snippets Groups Projects
Commit f07ecb81 authored by Peter Collingbourne's avatar Peter Collingbourne
Browse files

docs: Use the term "whole-program devirtualization" instead of "virtual...

docs: Use the term "whole-program devirtualization" instead of "virtual function call optimization".

The former term is probably more familiar to users. Also add references to
the command line flags used to enable the features described in the doc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299902 91177308-0d34-0410-b5e6-96231b3b80d8
parent c84d5c0f
No related branches found
No related tags found
No related merge requests found
...@@ -10,15 +10,16 @@ using link-time optimization; in the case where LTO is not being used, the ...@@ -10,15 +10,16 @@ using link-time optimization; in the case where LTO is not being used, the
linkage unit's LTO unit is empty. Each linkage unit has only a single LTO unit. linkage unit's LTO unit is empty. Each linkage unit has only a single LTO unit.
The LTO visibility of a class is used by the compiler to determine which The LTO visibility of a class is used by the compiler to determine which
classes the virtual function call optimization and control flow integrity classes the whole-program devirtualization (``-fwhole-program-vtables``) and
features apply to. These features use whole-program information, so they control flow integrity (``-fsanitize=cfi-vcall``) features apply to. These
require the entire class hierarchy to be visible in order to work correctly. features use whole-program information, so they require the entire class
hierarchy to be visible in order to work correctly.
If any translation unit in the program uses either of the virtual function
call optimization or control flow integrity features, it is effectively an If any translation unit in the program uses either of the whole-program
ODR violation to define a class with hidden LTO visibility in multiple linkage devirtualization or control flow integrity features, it is effectively an ODR
violation to define a class with hidden LTO visibility in multiple linkage
units. A class with public LTO visibility may be defined in multiple linkage units. A class with public LTO visibility may be defined in multiple linkage
units, but the tradeoff is that the virtual function call optimization and units, but the tradeoff is that the whole-program devirtualization and
control flow integrity features can only be applied to classes with hidden LTO control flow integrity features can only be applied to classes with hidden LTO
visibility. A class's LTO visibility is treated as an ODR-relevant property visibility. A class's LTO visibility is treated as an ODR-relevant property
of its definition, so it must be consistent between translation units. of its definition, so it must be consistent between translation units.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment