[pushed] doc: Editorial changes around -fprofile-partial-training

Message ID 20250912224438.81A6F19C14A@hamza.pair.com
State Committed
Headers
Series [pushed] doc: Editorial changes around -fprofile-partial-training |

Commit Message

Gerald Pfeifer Sept. 12, 2025, 10:44 p.m. UTC
  I found an old patch on my system that had editorial changes around the 
documentation of -fprofile-partial-training. Surprisingly it did not apply 
cleanly any more. When digging into it I found that

    commit b9857b78a4afb7ccdb8ff3858b48d25b1df5ceb3
    Author: Sandra Loosemore <sloosemore@baylibre.com>
    Date:   Tue Feb 11 21:52:36 2025 +0000

    Doc: Fix some typos and other nearby sloppy-writing issues
    
    I spotted some typos in the GCC manual.  Since often these are a sign
    that the text was inserted without being proofread, I looked at the
    context and fixed some grammar/punctuation/wording issues as well.
    
    gcc/ChangeLog
            * doc/extend.texi: Fix a bunch of typos and other writing bugs.
            * doc/invoke.texi: Likewise.

was the source of my conflicts.

In other words, Sandra beat me to (some of) it. :-)

I have not pushed this. Sandra, I'd much appreciate a review.

Gerald


gcc:
        * doc/invoke.texi (Optimize Options): Editorial changes around
        -fprofile-partial-training.
---
 gcc/doc/invoke.texi | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
  

Comments

Sandra Loosemore Sept. 12, 2025, 11:37 p.m. UTC | #1
On 9/12/25 16:44, Gerald Pfeifer wrote:
> I found an old patch on my system that had editorial changes around the
> documentation of -fprofile-partial-training. Surprisingly it did not apply
> cleanly any more. When digging into it I found that
> 
>      commit b9857b78a4afb7ccdb8ff3858b48d25b1df5ceb3
>      Author: Sandra Loosemore <sloosemore@baylibre.com>
>      Date:   Tue Feb 11 21:52:36 2025 +0000
> 
>      Doc: Fix some typos and other nearby sloppy-writing issues
>      
>      I spotted some typos in the GCC manual.  Since often these are a sign
>      that the text was inserted without being proofread, I looked at the
>      context and fixed some grammar/punctuation/wording issues as well.
>      
>      gcc/ChangeLog
>              * doc/extend.texi: Fix a bunch of typos and other writing bugs.
>              * doc/invoke.texi: Likewise.
> 
> was the source of my conflicts.
> 
> In other words, Sandra beat me to (some of) it. :-)
> 
> I have not pushed this. Sandra, I'd much appreciate a review.

Looks OK to me except for this bit:

> +the program later runs on.)  With @code{-fprofile-partial-training}
> +profile feedback is ignored for all functions not executed during the
> +training runs, them being optimized as if they were compiled without
> +profile feedback.

Maybe s/them being optimized/causing them to be optimized/ ??

-Sandra
  
Gerald Pfeifer Sept. 13, 2025, 10:40 a.m. UTC | #2
On Fri, 12 Sep 2025, Sandra Loosemore wrote:
> Looks OK to me except for this bit:
> 
>> +the program later runs on.)  With @code{-fprofile-partial-training}
>> +profile feedback is ignored for all functions not executed during the
>> +training runs, them being optimized as if they were compiled without
>> +profile feedback.
> 
> Maybe s/them being optimized/causing them to be optimized/ ??

Thank you, Sandra.

I made the change and this is what I now pushed.

Gerald



    doc: Editorial changes around -fprofile-partial-training
    
    gcc:
            * doc/invoke.texi (Optimize Options): Editorial changes around
            -fprofile-partial-training.

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index d0c13d4a24e..3ffc8d8d4a2 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -15592,16 +15592,16 @@ This option is enabled by @option{-fauto-profile}.
 
 @opindex fprofile-partial-training
 @item -fprofile-partial-training
-With @code{-fprofile-use} all portions of programs not executed during train
-run are optimized aggressively for size rather than speed.  In some cases it is
-not practical to train all possible hot paths in the program. (For
-example, program may contain functions specific for a given hardware and
-training may not cover all hardware configurations program is run on.)  With
-@code{-fprofile-partial-training} profile feedback is ignored for all
-functions not executed during the train run, leading them to be optimized as if
-they were compiled without profile feedback. This leads to better performance
-when train run is not representative but also leads to significantly bigger
-code.
+With @code{-fprofile-use} all portions of programs not executed during
+training runs are optimized aggressively for size rather than speed.
+In some cases it is not practical to train all possible hot paths in
+the program. (For example, it may contain functions specific to a
+given hardware and training may not cover all hardware configurations
+the program later runs on.)  With @code{-fprofile-partial-training}
+profile feedback is ignored for all functions not executed during the
+training runs, causing them to be optimized as if they were compiled
+without profile feedback. This leads to better performance when the
+training is not representative at the cost of significantly bigger code.
 
 @opindex fprofile-use
 @item -fprofile-use
  

Patch

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index d0c13d4a24e..c7b4d66df34 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -15592,16 +15592,16 @@  This option is enabled by @option{-fauto-profile}.
 
 @opindex fprofile-partial-training
 @item -fprofile-partial-training
-With @code{-fprofile-use} all portions of programs not executed during train
-run are optimized aggressively for size rather than speed.  In some cases it is
-not practical to train all possible hot paths in the program. (For
-example, program may contain functions specific for a given hardware and
-training may not cover all hardware configurations program is run on.)  With
-@code{-fprofile-partial-training} profile feedback is ignored for all
-functions not executed during the train run, leading them to be optimized as if
-they were compiled without profile feedback. This leads to better performance
-when train run is not representative but also leads to significantly bigger
-code.
+With @code{-fprofile-use} all portions of programs not executed during
+training runs are optimized aggressively for size rather than speed.
+In some cases it is not practical to train all possible hot paths in
+the program. (For example, it may contain functions specific to a
+given hardware and training may not cover all hardware configurations
+the program later runs on.)  With @code{-fprofile-partial-training}
+profile feedback is ignored for all functions not executed during the
+training runs, them being optimized as if they were compiled without
+profile feedback. This leads to better performance when the training
+is not representative at the cost of significantly bigger code.
 
 @opindex fprofile-use
 @item -fprofile-use