Re: PING: [PATCH]: Fix -fbranch-probabilities

2011-08-29 Thread Christian Bruel



On 08/27/2011 02:04 AM, Jan Hubicka wrote:

Hello,

Could I have a review for the trivial patch posted in
http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01123.html

-fprofile-use sets flag_branch_probabilities.

But we should also be able to use -fbranch-probabilities on its own
using the information generated by -fprofile-arcs, as documented.


OK, thanks!  I was under impression that some of gcov tests still use
-fprofile-arcs -fbranch-probabilities pair.


yes, indeed, this is was the documentation claims:
http://gcc.gnu.org/onlinedocs/gccint/C-Tests.html#C-Tests.

e.g for :

gcc.misc-tests
...
bprob*.c
Test -fbranch-probabilities using gcc.misc-tests/bprob.exp,
...

but bprob.exp sets feedback_options to -fprofile-use

 It don't seem to be the
 case, so if you add a testcase, you get extra score ;)

I feel more like fixing the bprob.exp discrepancy to have the correct 
pairing with the following. This will act as the testcase, since those 
tests fail without the patch.


OK ?


Index: gcc.misc-tests/bprob.exp
===
--- gcc.misc-tests/bprob.exp(revision 178096)
+++ gcc.misc-tests/bprob.exp(working copy)
@@ -48,7 +48,7 @@
 load_lib profopt.exp

 set profile_options -fprofile-arcs
-set feedback_options -fprofile-use
+set feedback_options -fbranch-probabilities

 foreach profile_option $profile_options feedback_option 
$feedback_options {

 foreach src [lsort [glob -nocomplain $srcdir/$subdir/bprob-*.c]] {

-
2011-08-29  Christian Bruel  christian.br...@st.com

* gcc.misc-tests/bprob.exp (feedback_options): Set 
-fbranch-probabilities.
-

Thanks

Christian




Honza


Many thanks

Christian


Re: PING: [PATCH]: Fix -fbranch-probabilities

2011-08-29 Thread Richard Guenther
On Mon, Aug 29, 2011 at 1:59 PM, Christian Bruel christian.br...@st.com wrote:


 On 08/27/2011 02:04 AM, Jan Hubicka wrote:

 Hello,

 Could I have a review for the trivial patch posted in
 http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01123.html

 -fprofile-use sets flag_branch_probabilities.

 But we should also be able to use -fbranch-probabilities on its own
 using the information generated by -fprofile-arcs, as documented.

 OK, thanks!  I was under impression that some of gcov tests still use
 -fprofile-arcs -fbranch-probabilities pair.

 yes, indeed, this is was the documentation claims:
 http://gcc.gnu.org/onlinedocs/gccint/C-Tests.html#C-Tests.

 e.g for :

 gcc.misc-tests
    ...
    bprob*.c
        Test -fbranch-probabilities using gcc.misc-tests/bprob.exp,
    ...

 but bprob.exp sets feedback_options to -fprofile-use

 It don't seem to be the
 case, so if you add a testcase, you get extra score ;)

 I feel more like fixing the bprob.exp discrepancy to have the correct
 pairing with the following. This will act as the testcase, since those tests
 fail without the patch.

 OK ?

If it works, yes.

Richard.


 Index: gcc.misc-tests/bprob.exp
 ===
 --- gcc.misc-tests/bprob.exp    (revision 178096)
 +++ gcc.misc-tests/bprob.exp    (working copy)
 @@ -48,7 +48,7 @@
  load_lib profopt.exp

  set profile_options -fprofile-arcs
 -set feedback_options -fprofile-use
 +set feedback_options -fbranch-probabilities

  foreach profile_option $profile_options feedback_option $feedback_options {
     foreach src [lsort [glob -nocomplain $srcdir/$subdir/bprob-*.c]] {

 -
 2011-08-29  Christian Bruel  christian.br...@st.com

        * gcc.misc-tests/bprob.exp (feedback_options): Set
 -fbranch-probabilities.
 -

 Thanks

 Christian



 Honza

 Many thanks

 Christian



PING: [PATCH]: Fix -fbranch-probabilities

2011-08-26 Thread Christian Bruel

Hello,

Could I have a review for the trivial patch posted in
http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01123.html

-fprofile-use sets flag_branch_probabilities.

But we should also be able to use -fbranch-probabilities on its own 
using the information generated by -fprofile-arcs, as documented.


Many thanks

Christian



Re: PING: [PATCH]: Fix -fbranch-probabilities

2011-08-26 Thread Jan Hubicka
 Hello,

 Could I have a review for the trivial patch posted in
 http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01123.html

 -fprofile-use sets flag_branch_probabilities.

 But we should also be able to use -fbranch-probabilities on its own  
 using the information generated by -fprofile-arcs, as documented.

OK, thanks!  I was under impression that some of gcov tests still use
-fprofile-arcs -fbranch-probabilities pair.  It don't seem to be the
case, so if you add a testcase, you get extra score ;)

Honza

 Many thanks

 Christian


[PATCH]: Fix -fbranch-probabilities

2011-08-12 Thread Christian Bruel

Hello,

-fbranch-probabilities fails to find the gcda information, because they 
are initialized only if flag_profile_use.


The problem is easily observable by recompiling with 
-fbranch-probabilities instead of -fprofile-use (after profile 
information generation)

This fails with xxx.gcda not found, execution counts estimated.

This trivial patch fixes it. testsuite ok.

OK ?

Christian

2011-08-12  Christian Bruel  christian.br...@st.com

	* coverage.c (coverage_init): Check flag_branch_probabilities instead of
	flag_profile_use.
	
Index: gcc/coverage.c
===
--- gcc/coverage.c	(revision 177690)
+++ gcc/coverage.c	(working copy)
@@ -1056,7 +1056,7 @@
   strcpy (bbg_file_name, filename);
   strcat (bbg_file_name, GCOV_NOTE_SUFFIX);
 
-  if (flag_profile_use)
+  if (flag_branch_probabilities)
 read_counts_file ();
 }