Re: [PATCH] gcov-profile: clarify profile-exclude-files documentation [PR96285]

2020-08-29 Thread Göran Uddeborg
Jeff Law:
> On Fri, 2020-07-24 at 15:42 +0200, Martin Liška wrote:
> > Please install the patch.
> I'm pretty sure Goran doesn't have write access.  So I committed the patch for
> him.

Thanks! (As I don't have write access, I didn't understand the
instruction was directed at me; I thought it was aimed to the list in
general.)


[PATCH] gcov-profile: clarify profile-exclude-files documentation [PR96285]

2020-07-24 Thread Göran Uddeborg
The wording of the description of -fprofile-exclude-files is easy to
misunderstand.  One can be led to believe a file is excluded only if
it matches all of the patterns, not just one.  This patch tries to
clarify the function.  It also adjusts the wording of
-fprofile-filter-files accordingly.

2020-07-24  Göran Uddeborg  

gcc/
PR gcov-profile/96285
* common.opt, doc/invoke.texi: Clarify wording of
-fprofile-exclude-files and adjust -fprofile-filter-files to
match.

diff --git a/gcc/common.opt b/gcc/common.opt
index a3893a4725e..1662cbfa92d 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2207,11 +2207,11 @@ Common Joined RejectNegative Enum(profile_update) 
Var(flag_profile_update) Init(
 
 fprofile-filter-files=
 Common Joined RejectNegative Var(flag_profile_filter_files)
-Instrument only functions from files where names match any regular expression 
(separated by a semi-colon).
+Instrument only functions from files whose name matches any of the regular 
expressions (separated by semi-colons).
 
 fprofile-exclude-files=
 Common Joined RejectNegative Var(flag_profile_exclude_files)
-Instrument only functions from files where names do not match all the regular 
expressions (separated by a semi-colon).
+Instrument only functions from files whose name does not match any of the 
regular expressions (separated by semi-colons).
 
 Enum
 Name(profile_reproducibility) Type(enum profile_reproducibility) 
UnknownError(unknown profile reproducibility method %qs)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ba18e05fb1a..781fe72ca97 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -13842,20 +13842,20 @@ is present in the command line.
 @item -fprofile-filter-files=@var{regex}
 @opindex fprofile-filter-files
 
-Instrument only functions from files where names match
-any regular expression (separated by a semi-colon).
+Instrument only functions from files whose name matches
+any of the regular expressions (separated by semi-colons).
 
-For example, @option{-fprofile-filter-files=main.c;module.*.c} will instrument
+For example, @option{-fprofile-filter-files=main\.c;module.*\.c} will 
instrument
 only @file{main.c} and all C files starting with 'module'.
 
 @item -fprofile-exclude-files=@var{regex}
 @opindex fprofile-exclude-files
 
-Instrument only functions from files where names do not match
-all the regular expressions (separated by a semi-colon).
+Instrument only functions from files whose name does not match
+any of the regular expressions (separated by semi-colons).
 
-For example, @option{-fprofile-exclude-files=/usr/*} will prevent 
instrumentation
-of all files that are located in @file{/usr/} folder.
+For example, @option{-fprofile-exclude-files=/usr/.*} will prevent 
instrumentation
+of all files that are located in the @file{/usr/} folder.
 
 @item -fprofile-reproducible
 @opindex fprofile-reproducible


Merge multi-line descriptions in .opt files

2013-07-20 Thread Göran Uddeborg
While translating GCC (to Swedish), I've occasionally come across
obviously truncated strings.  Often, it has been caused by multiple
lines used for the description in .opt files.  I've tried to file
reports about them.

One such report I made in late 2007.  In 2011 I got the suggestion to
send in patches instead.  See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34352 for details.  That
I'll do, I thought.

And promptly forgot about, apparently.

But better late than never!  I've finally made myself a little script
to discover those cases, and merged the descriptions into one line.  I
attach the suggested diff here.

Index: gcc/c-family/c.opt
===
--- gcc/c-family/c.opt  (revision 201084)
+++ gcc/c-family/c.opt  (arbetskopia)
@@ -1250,8 +1250,7 @@
 
 fext-numeric-literals
 C++ ObjC++ 
-Interpret imaginary, fixed-point, or other gnu number suffix as the 
corresponding
-number literal rather than a user-defined number literal.
+Interpret imaginary, fixed-point, or other gnu number suffix as the 
corresponding number literal rather than a user-defined number literal.
 
 idirafter
 C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs)
@@ -1369,13 +1368,11 @@
 
 std=gnu++98
 C++ ObjC++
-Conform to the ISO 1998 C++ standard revised by the 2003 technical
-corrigendum with GNU extensions
+Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum 
with GNU extensions
 
 std=gnu++03
 C++ ObjC++ Alias(std=gnu++98)
-Conform to the ISO 1998 C++ standard revised by the 2003 technical
-corrigendum with GNU extensions
+Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum 
with GNU extensions
 
 std=gnu++11
 C++ ObjC++
Index: gcc/common.opt
===
--- gcc/common.opt  (revision 201084)
+++ gcc/common.opt  (arbetskopia)
@@ -1213,13 +1213,11 @@
 
 fgcse-las
 Common Report Var(flag_gcse_las) Init(0) Optimization
-Perform redundant load after store elimination in global common subexpression
-elimination
+Perform redundant load after store elimination in global common subexpression 
elimination
 
 fgcse-after-reload
 Common Report Var(flag_gcse_after_reload) Optimization
-Perform global common subexpression elimination after register allocation
-has finished
+Perform global common subexpression elimination after register allocation has 
finished
 
 ; This option is not documented yet as its semantics will change.
 fgraphite
@@ -1232,8 +1230,7 @@
 
 fhoist-adjacent-loads
 Common Report Var(flag_hoist_adjacent_loads) Optimization
-Enable hoisting adjacent loads to encourage generating conditional move
-instructions
+Enable hoisting adjacent loads to encourage generating conditional move 
instructions
 
 floop-parallelize-all
 Common Report Var(flag_loop_parallelize_all) Optimization
@@ -1427,13 +1424,11 @@
 
 fira-hoist-pressure
 Common Report Var(flag_ira_hoist_pressure) Init(1) Optimization
-Use IRA based register pressure calculation
-in RTL hoist optimizations.
+Use IRA based register pressure calculation in RTL hoist optimizations.
 
 fira-loop-pressure
 Common Report Var(flag_ira_loop_pressure)
-Use IRA based register pressure calculation
-in RTL loop optimizations.
+Use IRA based register pressure calculation in RTL loop optimizations.
 
 fira-share-save-slots
 Common Report Var(flag_ira_share_save_slots) Init(1)
@@ -1669,8 +1664,7 @@
 
 fprofile-dir=
 Common Joined RejectNegative Var(profile_data_prefix)
-Set the top-level directory for storing the profile data.
-The default is 'pwd'.
+Set the top-level directory for storing the profile data.  The default is 
'pwd'.
 
 fprofile-correction
 Common Report Var(flag_profile_correction)
@@ -1884,8 +1878,7 @@
 
 fshrink-wrap
 Common Report Var(flag_shrink_wrap) Optimization
-Emit function prologues only before parts of the function that need it,
-rather than at the top of the function.
+Emit function prologues only before parts of the function that need it, rather 
than at the top of the function.
 
 fsignaling-nans
 Common Report Var(flag_signaling_nans) Optimization SetByCombined
@@ -2193,8 +2186,7 @@
 
 fassociative-math
 Common Report Var(flag_associative_math) SetByCombined
-Allow optimization for floating-point arithmetic which may change the
-result of the operation due to rounding.
+Allow optimization for floating-point arithmetic which may change the result 
of the operation due to rounding.
 
 freciprocal-math
 Common Report Var(flag_reciprocal_math) SetByCombined
Index: gcc/config/arm/arm.opt
===
--- gcc/config/arm/arm.opt  (revision 201084)
+++ gcc/config/arm/arm.opt  (arbetskopia)
@@ -245,8 +245,7 @@
 
 mfix-cortex-m3-ldrd
 Target Report Var(fix_cm3_ldrd) Init(2)
-Avoid overlapping destination and address registers on LDRD instructions
-that may trigger Cortex-M3 errata.
+Avoid overlapping destinatio