diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-12-15 23:37:20 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-12-15 23:37:20 +0000 |
commit | d4e3d326d83fd256b3bbe4ee946dd8f88624d842 (patch) | |
tree | 20c7839b7d8c2d9f0eccddbd0468abf9346ceb6a /gnu/usr.bin/gcc/f/gbe | |
parent | 1183132477cddceaebf3aed5106bec981b2f4de2 (diff) |
Update to g77 0.5.19
Diffstat (limited to 'gnu/usr.bin/gcc/f/gbe')
-rw-r--r-- | gnu/usr.bin/gcc/f/gbe/2.7.0.diff | 70 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/f/gbe/2.7.1.diff | 6 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/f/gbe/2.7.2.1.diff | 246 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/f/gbe/README | 64 |
4 files changed, 288 insertions, 98 deletions
diff --git a/gnu/usr.bin/gcc/f/gbe/2.7.0.diff b/gnu/usr.bin/gcc/f/gbe/2.7.0.diff index 5144d81128c..e69de29bb2d 100644 --- a/gnu/usr.bin/gcc/f/gbe/2.7.0.diff +++ b/gnu/usr.bin/gcc/f/gbe/2.7.0.diff @@ -1,70 +0,0 @@ -*** gcc-2.7.0/obstack.c Thu Jun 15 18:12:08 1995 ---- g77-2.7.0-0.5.16/obstack.c Thu Aug 10 04:06:51 1995 -*************** Foundation, 675 Mass Ave, Cambridge, MA -*** 27,33 **** - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, -! it is simpler to just do this in the source for each such file. */ - -! #if defined (_LIBC) || !defined (__GNU_LIBRARY__) - - ---- 27,40 ---- - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, -! it is simpler to just do this in the source for each such file. - -! Actually, don't comment this code out after all. Else, unless the -! inlining set up by obstack.h also is commented out (and replaced by -! including the system's <obstack.h>), bugs will result on a system -! with an older obstack (with older and different inlining) installed. -! And for now it doesn't seem worth having obstack.h #include <stdio.h>, -! as above, just to get __GNU_LIBRARY__ defined, for example. */ -! -! #if defined (_LIBC) || !defined (__GNU_LIBRARY__) || 1 - - -*** gcc-2.7.0/stor-layout.c Thu Jun 15 08:08:47 1995 ---- g77-2.7.0-0.5.16/stor-layout.c Thu Aug 10 14:00:15 1995 -*************** get_pending_sizes () -*** 82,85 **** ---- 82,95 ---- - } - -+ void -+ put_pending_sizes (chain) -+ tree chain; -+ { -+ if (pending_sizes) -+ abort (); -+ -+ pending_sizes = chain; -+ } -+ - /* Given a size SIZE that may not be a constant, return a SAVE_EXPR - to serve as the actual size-expression for a type or decl. */ -*** gcc-2.7.0/tree.c Thu Jun 15 08:10:23 1995 ---- g77-2.7.0-0.5.16/tree.c Mon Aug 28 12:21:15 1995 -*************** save_expr (expr) -*** 2111,2115 **** - - if (TREE_CONSTANT (t) || (TREE_READONLY (t) && ! TREE_SIDE_EFFECTS (t)) -! || TREE_CODE (t) == SAVE_EXPR) - return t; - ---- 2111,2115 ---- - - if (TREE_CONSTANT (t) || (TREE_READONLY (t) && ! TREE_SIDE_EFFECTS (t)) -! || TREE_CODE (t) == SAVE_EXPR || TREE_CODE (t) == ERROR_MARK) - return t; - -*** gcc-2.7.0/tree.h Thu Jun 15 08:10:49 1995 ---- g77-2.7.0-0.5.16/tree.h Thu Aug 10 04:06:52 1995 -*************** extern tree size_int PROTO((unsigned H -*** 1290,1293 **** ---- 1290,1294 ---- - extern tree round_up PROTO((tree, int)); - extern tree get_pending_sizes PROTO((void)); -+ extern void put_pending_sizes PROTO((tree)); - - /* Type for sizes of data-type. */ diff --git a/gnu/usr.bin/gcc/f/gbe/2.7.1.diff b/gnu/usr.bin/gcc/f/gbe/2.7.1.diff index e7bd45621e3..e69de29bb2d 100644 --- a/gnu/usr.bin/gcc/f/gbe/2.7.1.diff +++ b/gnu/usr.bin/gcc/f/gbe/2.7.1.diff @@ -1,6 +0,0 @@ -1996-03-07 - -This file would have been 124K long in the g77-0.5.18 distribution, -so, since 2.7.2.diff is available, this file has been omitted. -If you insist on using gcc-2.7.1 with g77-0.5.18, you should be -okay, except you won't get some of the nifty new optimizations. diff --git a/gnu/usr.bin/gcc/f/gbe/2.7.2.1.diff b/gnu/usr.bin/gcc/f/gbe/2.7.2.1.diff new file mode 100644 index 00000000000..95b84789fd6 --- /dev/null +++ b/gnu/usr.bin/gcc/f/gbe/2.7.2.1.diff @@ -0,0 +1,246 @@ +IMPORTANT: After applying this patch, you must rebuild the +Info documentation derived from the Texinfo files in the +gcc distribution, as this patch does not include patches +to any derived files (due to differences in the way gcc +version 2.7.2.1 is obtained by users). Use the following +command sequence after applying this patch: + + cd gcc-2.7.2.1; make -f Makefile.in gcc.info + +If that fails due to `makeinfo' not being installed, obtain +texinfo-3.9.tar.gz from a GNU distribution site, unpack, +build, and install it, and try the above command sequence +again. + + +diff -rcp2N gcc-2.7.2.1/flags.h gcc-2.7.2.1.f.1/flags.h +*** gcc-2.7.2.1/flags.h Thu Jun 15 07:34:11 1995 +--- gcc-2.7.2.1.f.1/flags.h Mon Nov 11 15:02:26 1996 +*************** extern int flag_unroll_loops; +*** 204,207 **** +--- 204,221 ---- + extern int flag_unroll_all_loops; + ++ /* Nonzero forces all invariant computations in loops to be moved ++ outside the loop. */ ++ ++ extern int flag_move_all_movables; ++ ++ /* Nonzero forces all general induction variables in loops to be ++ strength reduced. */ ++ ++ extern int flag_reduce_all_givs; ++ ++ /* Nonzero gets another run of loop_optimize performed. */ ++ ++ extern int flag_rerun_loop_opt; ++ + /* Nonzero for -fcse-follow-jumps: + have cse follow jumps to do a more extensive job. */ +diff -rcp2N gcc-2.7.2.1/gcc.texi gcc-2.7.2.1.f.1/gcc.texi +*** gcc-2.7.2.1/gcc.texi Mon Nov 11 14:54:07 1996 +--- gcc-2.7.2.1.f.1/gcc.texi Mon Nov 11 15:04:26 1996 +*************** original English. +*** 149,152 **** +--- 149,153 ---- + @sp 3 + @center Last updated 29 June 1996 ++ @center (Revised for GNU Fortran 1996-03-06) + @sp 1 + @c The version number appears twice more in this file. +diff -rcp2N gcc-2.7.2.1/invoke.texi gcc-2.7.2.1.f.1/invoke.texi +*** gcc-2.7.2.1/invoke.texi Tue Oct 3 11:40:43 1995 +--- gcc-2.7.2.1.f.1/invoke.texi Mon Nov 11 15:02:33 1996 +*************** in the following sections. +*** 149,152 **** +--- 149,153 ---- + -fschedule-insns2 -fstrength-reduce -fthread-jumps + -funroll-all-loops -funroll-loops ++ -fmove-all-movables -freduce-all-givs -frerun-loop-opt + -O -O0 -O1 -O2 -O3 + @end smallexample +*************** Perform the optimization of loop unrolli +*** 1940,1943 **** +--- 1941,1985 ---- + and usually makes programs run more slowly. @samp{-funroll-all-loops} + implies @samp{-fstrength-reduce} as well as @samp{-frerun-cse-after-loop}. ++ ++ @item -fmove-all-movables ++ Forces all invariant computations in loops to be moved ++ outside the loop. ++ This option is provided primarily to improve performance ++ for some Fortran code, though it might improve code written ++ in other languages. ++ ++ @emph{Note:} When compiling programs written in Fortran, ++ this option is enabled by default. ++ ++ Analysis of Fortran code optimization and the resulting ++ optimizations triggered by this option, and the ++ @samp{-freduce-all-givs} and @samp{-frerun-loop-opt} ++ options as well, were ++ contributed by Toon Moene (@code{toon@@moene.indiv.nluug.nl}). ++ ++ Please let us (@code{fortran@@gnu.ai.mit.edu}) ++ know how use of these options affects ++ the performance of your production code. ++ We're very interested in code that runs @emph{slower} ++ when these options are @emph{enabled}. ++ ++ @item -freduce-all-givs ++ Forces all general-induction variables in loops to be ++ strength-reduced. ++ This option is provided primarily to improve performance ++ for some Fortran code, though it might improve code written ++ in other languages. ++ ++ @emph{Note:} When compiling programs written in Fortran, ++ this option is enabled by default. ++ ++ @item -frerun-loop-opt ++ Runs loop optimizations a second time. ++ This option is provided primarily to improve performance ++ for some Fortran code, though it might improve code written ++ in other languages. ++ ++ @emph{Note:} When compiling programs written in Fortran, ++ this option is enabled by default. + + @item -fno-peephole +diff -rcp2N gcc-2.7.2.1/loop.c gcc-2.7.2.1.f.1/loop.c +*** gcc-2.7.2.1/loop.c Mon Nov 11 14:54:08 1996 +--- gcc-2.7.2.1.f.1/loop.c Mon Nov 11 15:02:33 1996 +*************** move_movables (movables, threshold, insn +*** 1629,1632 **** +--- 1629,1633 ---- + + if (already_moved[regno] ++ || flag_move_all_movables + || (threshold * savings * m->lifetime) >= insn_count + || (m->forces && m->forces->done +*************** strength_reduce (scan_start, end, loop_t +*** 3821,3826 **** + exit. */ + +! if (v->lifetime * threshold * benefit < insn_count +! && ! bl->reversed) + { + if (loop_dump_stream) +--- 3822,3827 ---- + exit. */ + +! if ( ! flag_reduce_all_givs && v->lifetime * threshold * benefit < insn_count +! && ! bl->reversed ) + { + if (loop_dump_stream) +diff -rcp2N gcc-2.7.2.1/toplev.c gcc-2.7.2.1.f.1/toplev.c +*** gcc-2.7.2.1/toplev.c Fri Oct 20 17:56:35 1995 +--- gcc-2.7.2.1.f.1/toplev.c Mon Nov 11 15:02:33 1996 +*************** int flag_unroll_loops; +*** 388,391 **** +--- 388,405 ---- + int flag_unroll_all_loops; + ++ /* Nonzero forces all invariant computations in loops to be moved ++ outside the loop. */ ++ ++ int flag_move_all_movables = 0; ++ ++ /* Nonzero forces all general induction variables in loops to be ++ strength reduced. */ ++ ++ int flag_reduce_all_givs = 0; ++ ++ /* Nonzero gets another run of loop_optimize performed. */ ++ ++ int flag_rerun_loop_opt = 0; ++ + /* Nonzero for -fwritable-strings: + store string constants in data segment and don't uniquize them. */ +*************** struct { char *string; int *variable; in +*** 542,545 **** +--- 556,562 ---- + {"unroll-loops", &flag_unroll_loops, 1}, + {"unroll-all-loops", &flag_unroll_all_loops, 1}, ++ {"move-all-movables", &flag_move_all_movables, 1}, ++ {"reduce-all-givs", &flag_reduce_all_givs, 1}, ++ {"rerun-loop-opt", &flag_rerun_loop_opt, 1}, + {"writable-strings", &flag_writable_strings, 1}, + {"peephole", &flag_no_peephole, 0}, +*************** rest_of_compilation (decl) +*** 2894,2897 **** +--- 2911,2916 ---- + { + loop_optimize (insns, loop_dump_file); ++ if (flag_rerun_loop_opt) ++ loop_optimize (insns, loop_dump_file); + }); + } +diff -rcp2N gcc-2.7.2.1/tree.c gcc-2.7.2.1.f.1/tree.c +*** gcc-2.7.2.1/tree.c Sun Oct 1 21:26:56 1995 +--- gcc-2.7.2.1.f.1/tree.c Mon Nov 11 15:02:33 1996 +*************** saveable_tree_cons (purpose, value, chai +*** 1965,1968 **** +--- 1965,1992 ---- + } + ++ /* Try to find out whether the type for which the size is to be determined ++ is an ARRAY(of ARRAY(of ARRAY ... of something with a constant size ++ which is an integral multiple of BITS_PER_UNIT)). ++ In that case, the size in bytes can be determined using an EXACT_DIV_EXPR. ++ */ ++ enum tree_code ++ which_div_expr(type) ++ tree type; ++ { ++ tree t; ++ ++ if (TREE_CODE (type) != POINTER_TYPE && TREE_CODE (type) != ARRAY_TYPE) ++ return CEIL_DIV_EXPR; ++ ++ for (t = TREE_TYPE (type); TREE_CODE (t) == ARRAY_TYPE; t = TREE_TYPE (t)) ++ ; ++ ++ if (TYPE_SIZE (t) != 0 && TREE_CODE (TYPE_SIZE (t)) == INTEGER_CST && ++ TREE_INT_CST_LOW (TYPE_SIZE (t)) % BITS_PER_UNIT == 0) ++ return EXACT_DIV_EXPR; ++ else ++ return CEIL_DIV_EXPR; ++ } ++ + /* Return the size nominally occupied by an object of type TYPE + when it resides in memory. The value is measured in units of bytes, +*************** size_in_bytes (type) +*** 1985,1989 **** + return integer_zero_node; + } +! t = size_binop (CEIL_DIV_EXPR, TYPE_SIZE (type), + size_int (BITS_PER_UNIT)); + if (TREE_CODE (t) == INTEGER_CST) +--- 2009,2013 ---- + return integer_zero_node; + } +! t = size_binop (which_div_expr (type), TYPE_SIZE (type), + size_int (BITS_PER_UNIT)); + if (TREE_CODE (t) == INTEGER_CST) +*************** int_size_in_bytes (type) +*** 2009,2013 **** + if (TREE_INT_CST_HIGH (TYPE_SIZE (type)) != 0) + { +! tree t = size_binop (CEIL_DIV_EXPR, TYPE_SIZE (type), + size_int (BITS_PER_UNIT)); + return TREE_INT_CST_LOW (t); +--- 2033,2037 ---- + if (TREE_INT_CST_HIGH (TYPE_SIZE (type)) != 0) + { +! tree t = size_binop (which_div_expr (type), TYPE_SIZE (type), + size_int (BITS_PER_UNIT)); + return TREE_INT_CST_LOW (t); +diff -rcp2N gcc-2.7.2.1/version.c gcc-2.7.2.1.f.1/version.c +*** gcc-2.7.2.1/version.c Mon Nov 11 14:54:09 1996 +--- gcc-2.7.2.1.f.1/version.c Mon Nov 11 15:02:34 1996 +*************** +*** 1 **** +! char *version_string = "2.7.2.1"; +--- 1 ---- +! char *version_string = "2.7.2.1.f.1"; diff --git a/gnu/usr.bin/gcc/f/gbe/README b/gnu/usr.bin/gcc/f/gbe/README index 0e7585f90c3..1752b600aed 100644 --- a/gnu/usr.bin/gcc/f/gbe/README +++ b/gnu/usr.bin/gcc/f/gbe/README @@ -1,33 +1,53 @@ -951118 - -This directory contains .diff files for various GNU CC distributions. -The name of a file tells which version to which it applies. Prior to -gcc version 2.7.1, g77 will not build without the appropriate .diff -file applied to the GNU CC distribution via patch. That is because -g77 needs certain changes to be made to the GNU CC back end, which -it shares with not only the C front end, but with other GNU front -ends (C++, Objective-C, Pascal, ADA, Chill, ...) as well. Version -2.7.1 of gcc includes the changes needed by g77 versions through 0.5.17. -Future versions of g77 might again require changes to versions 2.7.1, -and later versions, of gcc. +961207 + +This directory contains .diff files for various GNU CC distributions +supported by this version of GNU Fortran. + +The name of a file includes which gcc version to which it applies. +For example, 2.7.2.1.diff is the patch file for gcc version 2.7.2.1. + +To apply a .diff file to, say, gcc 2.7.2, one might use the following +command (where the current directory contains the gcc source distribution +after merging into it the g77 source distribution, which would be +named gcc-2.7.2 in this example): + + patch -p1 -d gcc-2.7.2 < gcc-2.7.2/f/gbe/2.7.2.diff + + +This version of g77 is best combined with gcc versions 2.7.2 or 2.7.2.1. + +However, note that applying the patch for version 2.7.2.1 +does _not_ update the gcc.info* files that constitute the Info +documentation for gcc. Therefore, after applying the 2.7.2.1.diff +patch to the gcc-2.7.2.1 source directory, you must rebuild the +Info documentation yourself via: + + cd gcc-2.7.2.1; make -f Makefile.in gcc.info + +If the above command doesn't work because you don't have makeinfo +installed, you are STRONGLY encouraged to obtain the most recent +version of the GNU texinfo package (texinfo-3.9.tar.gz as of this +writing), build, and install it, then try the above command (as +makeinfo is part of texinfo). + +(The 2.7.2.1 patch omits the gcc.info* patches because your gcc-2.7.2.1 +might have one of at least two different versions of these gcc.info* +files, depending on how you obtained the gcc source directory -- by +unpacking gcc-2.7.2.1.tar.gz directly, or by applying a patch to upgrade +a copy of gcc-2.7.2.) This distribution of g77 is not supported for versions of gcc prior to 2.6.2. The 2.6.3 patch file should work for version 2.6.2, but you should probably use gcc-2.6.3 in any case if that is possible. -To apply a .diff file to, say, gcc 2.7.0, one might use the following -command: - - patch -p1 -d gcc-2.7.0 < gcc-2.7.0/f/gbe/2.7.0.diff - If you are using a version of gcc more recent than the most recent .diff file's version, try the most recent .diff ONLY if the difference is in the third field. E.g. the above -patch might work on gcc-2.6.4 or gcc-2.6.5 if these were +patch might work on gcc-2.7.3 or gcc-2.7.4 if these were released. On the other hand, it probably wouldn't work for -a more major release like gcc-2.7.0 or gcc-3.0.0, and you +a more major release like gcc-2.8.0 or gcc-3.0.0, and you shouldn't try it. If the .diff file is missing, don't bother asking `fortran@gnu.ai.mit.edu' for it -- it is certainly -being worked on. In the meantime, watch the usual channels -(see gcc/f/DOC *TROUBLE (BUGS, ETC.)*) for information on -support for the new version of gcc. +being worked on. In the meantime, watch the usual place +(`info -f g77') for information on support for the recent +versions of gcc. |