From: Toon Moene <toon@moene.indiv.nluug.nl>
To: gcc@gcc.gnu.org
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: RFC: Remove flags -fmove-all-movables and -freduce-all-givs.
Date: Sat, 11 Sep 2004 17:37:00 -0000 [thread overview]
Message-ID: <41433266.5010908@moene.indiv.nluug.nl> (raw)
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
L.S.,
The flags mentioned in the subject were introduced seven years ago to
help the heuristics in loop.c in case of code commonly encountered in
Fortran.
Because loop.c is on its way out and current loop optimizations have a
different structure, there's little reason to keep these flags.
On the contrary, now that we have decided that 4.0.0 is a nice round
version number, perhaps we can get away with such a change.
The proposed patch is attached.
Please, reflect.
--
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/
[-- Attachment #2: remflags.patch --]
[-- Type: text/plain, Size: 5818 bytes --]
2004-09-11 Toon Moene <toon@moene.indiv.nluug.nl>
* common.opt: Remove flags -fmove-all-movables and
-freduce-all-givs.
* loop-invariant.c (find_invariants_to_move):
Remove all uses of flag_move_all_movables.
* loop.c (move_movables): Remove all uses of
flag_move_all_movables.
(strength_reduce): Remove all uses of
flag_reduce_all_givs.
* doc/invoke.texi: Remove documentation of flags
-fremove-all-movables and -freduce-all-givs.
*** common.opt.orig Fri Sep 10 22:29:33 2004
--- common.opt Sat Sep 11 18:59:54 2004
*************** fmodulo-sched
*** 523,532 ****
Common Report Var(flag_modulo_sched)
Perform SMS based modulo scheduling before the first scheduling pass
- fmove-all-movables
- Common Report Var(flag_move_all_movables)
- Force all loop invariant computations out of loops
-
fmove-loop-invariants
Common Report Var(flag_move_loop_invariants)
Move loop invariant computations out of loops
--- 523,528 ----
*************** frandom-seed=
*** 646,655 ****
Common Joined RejectNegative
-frandom-seed=<string> Make compile reproducible using <string>
- freduce-all-givs
- Common Report Var(flag_reduce_all_givs)
- Strength reduce all loop general induction variables
-
freg-struct-return
Common Report Var(flag_pcc_struct_return,0) VarExists
Return small aggregates in registers
--- 642,647 ----
*** loop-invariant.c.orig Fri Sep 10 22:29:35 2004
--- loop-invariant.c Sat Sep 11 19:00:31 2004
*************** find_invariants_to_move (struct df *df)
*** 715,731 ****
unsigned i, regs_used, n_inv_uses, regs_needed = 0, new_regs;
struct invariant *inv = NULL;
- if (flag_move_all_movables)
- {
- /* This is easy & stupid. */
- for (i = 0; i < VARRAY_ACTIVE_SIZE (invariants); i++)
- {
- inv = VARRAY_GENERIC_PTR_NOGC (invariants, i);
- inv->move = true;
- }
- return;
- }
-
if (!VARRAY_ACTIVE_SIZE (invariants))
return;
--- 715,720 ----
*** loop.c.orig Fri Sep 10 22:29:35 2004
--- loop.c Sat Sep 11 19:02:23 2004
*************** move_movables (struct loop *loop, struct
*** 1885,1891 ****
extra cost because something else was already moved. */
if (already_moved[regno]
- || flag_move_all_movables
|| (threshold * savings * m->lifetime) >=
(regs->array[regno].moved_once ? insn_count * 2 : insn_count)
|| (m->forces && m->forces->done
--- 1885,1890 ----
*************** strength_reduce (struct loop *loop, int
*** 5122,5129 ****
of such giv's whether or not we know they are used after the loop
exit. */
! if (! flag_reduce_all_givs
! && v->lifetime * threshold * benefit < insn_count
&& ! bl->reversed)
{
if (loop_dump_stream)
--- 5121,5127 ----
of such giv's whether or not we know they are used after the loop
exit. */
! if (v->lifetime * threshold * benefit < insn_count
&& ! bl->reversed)
{
if (loop_dump_stream)
*** doc/invoke.texi.orig Sat Sep 11 12:06:53 2004
--- doc/invoke.texi Sat Sep 11 19:04:13 2004
*************** Objective-C and Objective-C++ Dialects}.
*** 294,300 ****
-floop-optimize -fcrossjumping -fif-conversion -fif-conversion2 @gol
-finline-functions -finline-limit=@var{n} -fkeep-inline-functions @gol
-fkeep-static-consts -fmerge-constants -fmerge-all-constants @gol
! -fmodulo-sched -fmove-all-movables -fnew-ra -fno-branch-count-reg @gol
-fno-default-inline -fno-defer-pop -floop-optimize2 -fmove-loop-invariants @gol
-fno-function-cse -fno-guess-branch-probability @gol
-fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
--- 294,300 ----
-floop-optimize -fcrossjumping -fif-conversion -fif-conversion2 @gol
-finline-functions -finline-limit=@var{n} -fkeep-inline-functions @gol
-fkeep-static-consts -fmerge-constants -fmerge-all-constants @gol
! -fmodulo-sched -fnew-ra -fno-branch-count-reg @gol
-fno-default-inline -fno-defer-pop -floop-optimize2 -fmove-loop-invariants @gol
-fno-function-cse -fno-guess-branch-probability @gol
-fno-inline -fno-math-errno -fno-peephole -fno-peephole2 @gol
*************** Objective-C and Objective-C++ Dialects}.
*** 303,309 ****
-fomit-frame-pointer -foptimize-register-move @gol
-foptimize-sibling-calls -fprefetch-loop-arrays @gol
-fprofile-generate -fprofile-use @gol
! -freduce-all-givs -fregmove -frename-registers @gol
-freorder-blocks -freorder-blocks-and-partition -freorder-functions @gol
-frerun-cse-after-loop -frerun-loop-opt @gol
-frounding-math -fschedule-insns -fschedule-insns2 @gol
--- 303,309 ----
-fomit-frame-pointer -foptimize-register-move @gol
-foptimize-sibling-calls -fprefetch-loop-arrays @gol
-fprofile-generate -fprofile-use @gol
! -fregmove -frename-registers @gol
-freorder-blocks -freorder-blocks-and-partition -freorder-functions @gol
-frerun-cse-after-loop -frerun-loop-opt @gol
-frounding-math -fschedule-insns -fschedule-insns2 @gol
*************** the loop is entered. This usually makes
*** 4702,4721 ****
If supported by the target machine, generate instructions to prefetch
memory to improve the performance of loops that access large arrays.
- @item -fmove-all-movables
- @opindex fmove-all-movables
- Forces all invariant computations in loops to be moved
- outside the loop.
-
- @item -freduce-all-givs
- @opindex freduce-all-givs
- 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.
--- 4702,4707 ----
next reply other threads:[~2004-09-11 17:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-11 17:37 Toon Moene [this message]
2004-09-11 19:02 ` Richard Henderson
2004-09-12 11:39 ` Toon Moene
2004-09-13 13:51 ` Giovanni Bajo
2004-09-13 14:18 ` Joseph S. Myers
2004-09-13 23:51 ` Toon Moene
2004-09-17 16:30 ` Toon Moene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41433266.5010908@moene.indiv.nluug.nl \
--to=toon@moene.indiv.nluug.nl \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).