|
|
f56e54 |
commit 77e6311332590004c5aec82ceeb45e4d4d93f690
|
|
|
f56e54 |
Author: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
|
|
|
f56e54 |
Date: Thu Apr 11 08:52:22 2019 +0000
|
|
|
f56e54 |
|
|
|
f56e54 |
Clarify documentation for -flive-patching
|
|
|
f56e54 |
|
|
|
f56e54 |
* doc/invoke.texi (Optimize Options): Clarify -flive-patching docs.
|
|
|
f56e54 |
|
|
|
f56e54 |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270276 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
f56e54 |
|
|
|
f56e54 |
--- gcc/doc/invoke.texi
|
|
|
f56e54 |
+++ gcc/doc/invoke.texi
|
|
|
f56e54 |
@@ -9367,24 +9367,24 @@ This flag is enabled by default at @option{-O2} and @option{-Os}.
|
|
|
f56e54 |
|
|
|
f56e54 |
@item -flive-patching=@var{level}
|
|
|
f56e54 |
@opindex flive-patching
|
|
|
f56e54 |
-Control GCC's optimizations to provide a safe compilation for live-patching.
|
|
|
f56e54 |
+Control GCC's optimizations to produce output suitable for live-patching.
|
|
|
f56e54 |
|
|
|
f56e54 |
If the compiler's optimization uses a function's body or information extracted
|
|
|
f56e54 |
from its body to optimize/change another function, the latter is called an
|
|
|
f56e54 |
impacted function of the former. If a function is patched, its impacted
|
|
|
f56e54 |
functions should be patched too.
|
|
|
f56e54 |
|
|
|
f56e54 |
-The impacted functions are decided by the compiler's interprocedural
|
|
|
f56e54 |
-optimizations. For example, inlining a function into its caller, cloning
|
|
|
f56e54 |
-a function and changing its caller to call this new clone, or extracting
|
|
|
f56e54 |
-a function's pureness/constness information to optimize its direct or
|
|
|
f56e54 |
-indirect callers, etc.
|
|
|
f56e54 |
+The impacted functions are determined by the compiler's interprocedural
|
|
|
f56e54 |
+optimizations. For example, a caller is impacted when inlining a function
|
|
|
f56e54 |
+into its caller,
|
|
|
f56e54 |
+cloning a function and changing its caller to call this new clone,
|
|
|
f56e54 |
+or extracting a function's pureness/constness information to optimize
|
|
|
f56e54 |
+its direct or indirect callers, etc.
|
|
|
f56e54 |
|
|
|
f56e54 |
Usually, the more IPA optimizations enabled, the larger the number of
|
|
|
f56e54 |
impacted functions for each function. In order to control the number of
|
|
|
f56e54 |
-impacted functions and computed the list of impacted function easily,
|
|
|
f56e54 |
-we provide control to partially enable IPA optimizations on two different
|
|
|
f56e54 |
-levels.
|
|
|
f56e54 |
+impacted functions and more easily compute the list of impacted function,
|
|
|
f56e54 |
+IPA optimizations can be partially enabled at two different levels.
|
|
|
f56e54 |
|
|
|
f56e54 |
The @var{level} argument should be one of the following:
|
|
|
f56e54 |
|
|
|
f56e54 |
@@ -9395,7 +9395,7 @@ The @var{level} argument should be one of the following:
|
|
|
f56e54 |
Only enable inlining and cloning optimizations, which includes inlining,
|
|
|
f56e54 |
cloning, interprocedural scalar replacement of aggregates and partial inlining.
|
|
|
f56e54 |
As a result, when patching a function, all its callers and its clones'
|
|
|
f56e54 |
-callers need to be patched as well.
|
|
|
f56e54 |
+callers are impacted, therefore need to be patched as well.
|
|
|
f56e54 |
|
|
|
f56e54 |
@option{-flive-patching=inline-clone} disables the following optimization flags:
|
|
|
f56e54 |
@gccoptlist{-fwhole-program -fipa-pta -fipa-reference -fipa-ra @gol
|
|
|
f56e54 |
@@ -9406,22 +9406,23 @@ callers need to be patched as well.
|
|
|
f56e54 |
@item inline-only-static
|
|
|
f56e54 |
|
|
|
f56e54 |
Only enable inlining of static functions.
|
|
|
f56e54 |
-As a result, when patching a static function, all its callers need to be
|
|
|
f56e54 |
-patches as well.
|
|
|
f56e54 |
+As a result, when patching a static function, all its callers are impacted
|
|
|
f56e54 |
+and so need to be patched as well.
|
|
|
f56e54 |
|
|
|
f56e54 |
-In addition to all the flags that -flive-patching=inline-clone disables,
|
|
|
f56e54 |
+In addition to all the flags that @option{-flive-patching=inline-clone}
|
|
|
f56e54 |
+disables,
|
|
|
f56e54 |
@option{-flive-patching=inline-only-static} disables the following additional
|
|
|
f56e54 |
optimization flags:
|
|
|
f56e54 |
@gccoptlist{-fipa-cp-clone -fipa-sra -fpartial-inlining -fipa-cp}
|
|
|
f56e54 |
|
|
|
f56e54 |
@end table
|
|
|
f56e54 |
|
|
|
f56e54 |
-When -flive-patching specified without any value, the default value
|
|
|
f56e54 |
-is "inline-clone".
|
|
|
f56e54 |
+When @option{-flive-patching} is specified without any value, the default value
|
|
|
f56e54 |
+is @var{inline-clone}.
|
|
|
f56e54 |
|
|
|
f56e54 |
This flag is disabled by default.
|
|
|
f56e54 |
|
|
|
f56e54 |
-Note that -flive-patching is not supported with link-time optimizer.
|
|
|
f56e54 |
+Note that @option{-flive-patching} is not supported with link-time optimization
|
|
|
f56e54 |
(@option{-flto}).
|
|
|
f56e54 |
|
|
|
f56e54 |
@item -fisolate-erroneous-paths-dereference
|