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]

-freduce-all-givs and fortran



Hi,
the fortran fontend enables by default -freduce-all-gics and
-fmove-all-movables.  This causes important problem on i386, where reducing all
givs brings too many temporary registers causing too many spills.

I don't follow the philosophy behind this decision.  What makes code generated
from fortran different?  It may be well possible that these options were
believed to help numeric code and waste integer one, but then it should be
documented and different option should be made for that, as numeric
programs are not limited to fortran.

Whats about simply dropping this?

Honza

Wed Sep  5 15:54:47 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* com.c (ffe_init_options): Do not default reducle_all_givs and
	move_all_movables.
	* invoke.texi (reduct-all-givs): No longer mention it is enabled
	by default.

Index: com.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/f/com.c,v
retrieving revision 1.127
diff -c -3 -p -r1.127 com.c
*** com.c	2001/07/20 13:27:40	1.127
--- com.c	2001/09/05 13:52:24
*************** static void
*** 14654,14661 ****
  ffe_init_options ()
  {
    /* Set default options for Fortran.  */
-   flag_move_all_movables = 1;
-   flag_reduce_all_givs = 1;
    flag_argument_noalias = 2;
    flag_errno_math = 0;
    flag_complex_divide_method = 1;
--- 14654,14659 ----
Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/doc/invoke.texi,v
retrieving revision 1.51
diff -c -3 -p -r1.51 invoke.texi
*** invoke.texi	2001/09/05 08:30:35	1.51
--- invoke.texi	2001/09/05 13:53:34
*************** outside the loop.
*** 3570,3579 ****
  Forces all general-induction variables in loops to be
  strength-reduced.
  
- @emph{Note:} When compiling programs written in Fortran,
- @option{-fmove-all-movables} and @option{-freduce-all-givs} are enabled
- by default when you use the optimizer.
- 
  These options may generate better or worse code; results are highly
  dependent on the structure of loops within the source code.
  
--- 3570,3575 ----


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