This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Should -fcross-jumping be part of -O1?


> Jan Hubicka wrote:
> >crossjumping has been -O1 thing forever, but I would also agree that
> >it should be disabled at -O1.  At minimum it may get compile time
> >expensive in some cases.
> 
> If "-fcrossjumping" has been part of -O1 "forever", as you say, why
> wasn't it mentioned in the man pages prior to GCC 3.3? This is one
> reason I missed testing it in earlier incarnations of gccacovea.
> 
> Version 3.1 of Acovea (to be posted mid-week) now tests some 65 options 
> (as opposed to 55 in Avocea 3.0.0).
> 
> >Do you have testcases that ere pessimized at -O2?  -fcrossjumping may
> > introduce new branches that are supposed to be elliminated by basic 
> >block reordering not done at -O1.
> 
> Pentium 4 results for the huffbench.c test:
> 
> 37.8s   -O1
> 34.0s	-O1 -fno-crossjumping
> 31.7s	-O2
> 30.3s	-O2 -fno-crossjumping
> 30.7s	-O3
> 28.0s 	-O3 -fno-crossjumping
> 37.6s	-Os
> 35.4s   -Os -fno-crossjumping
Hi,
the attached patch disables crossjumping at -O1, it still is enabled for
-O2 as I do believe it has good code size/performance ratios (last SPEC
runs I did -fcrossjumping were neutral perofmrance wise), but perhaps
the situation has changed.  But in that case it should be analyzed and
solved.

bootstrapped/regtested i386.

2003-11-23  Jan Hubicka  <jh@suse.cz>
	* opts.c (decode_options):  Disable crossjumping at -O1
	* invoke.texi (-O1): Document change.

Index: opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.c,v
retrieving revision 1.46
diff -c -3 -p -r1.46 opts.c
*** opts.c	21 Nov 2003 04:05:05 -0000	1.46
--- opts.c	23 Nov 2003 20:00:48 -0000
*************** decode_options (unsigned int argc, const
*** 529,541 ****
        flag_guess_branch_prob = 1;
        flag_cprop_registers = 1;
        flag_loop_optimize = 1;
-       flag_crossjumping = 1;
        flag_if_conversion = 1;
        flag_if_conversion2 = 1;
      }
  
    if (optimize >= 2)
      {
        flag_optimize_sibling_calls = 1;
        flag_cse_follow_jumps = 1;
        flag_cse_skip_blocks = 1;
--- 529,541 ----
        flag_guess_branch_prob = 1;
        flag_cprop_registers = 1;
        flag_loop_optimize = 1;
        flag_if_conversion = 1;
        flag_if_conversion2 = 1;
      }
  
    if (optimize >= 2)
      {
+       flag_crossjumping = 1;
        flag_optimize_sibling_calls = 1;
        flag_cse_follow_jumps = 1;
        flag_cse_skip_blocks = 1;
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.364
diff -c -3 -p -r1.364 invoke.texi
*** doc/invoke.texi	21 Nov 2003 11:42:58 -0000	1.364
--- doc/invoke.texi	23 Nov 2003 20:00:52 -0000
*************** compilation time.
*** 3651,3657 ****
  -fmerge-constants @gol
  -fthread-jumps @gol
  -floop-optimize @gol
- -fcrossjumping @gol
  -fif-conversion @gol
  -fif-conversion2 @gol
  -fdelayed-branch @gol
--- 3651,3656 ----
*************** also turns on the following optimization
*** 3688,3694 ****
  -fstrict-aliasing @gol
  -funit-at-a-time @gol
  -falign-functions  -falign-jumps @gol
! -falign-loops  -falign-labels}
  
  Please note the warning under @option{-fgcse} about
  invoking @option{-O2} on programs that use computed gotos.
--- 3687,3694 ----
  -fstrict-aliasing @gol
  -funit-at-a-time @gol
  -falign-functions  -falign-jumps @gol
! -falign-loops  -falign-labels @gol
! -fcrossjumping}
  
  Please note the warning under @option{-fgcse} about
  invoking @option{-O2} on programs that use computed gotos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]