From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2927 invoked by alias); 11 Sep 2004 17:14:45 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 2848 invoked from network); 11 Sep 2004 17:14:41 -0000 Received: from unknown (HELO book.moene.indiv.nluug.nl) (195.109.255.217) by sourceware.org with SMTP; 11 Sep 2004 17:14:41 -0000 Received: from local ([127.0.0.1] helo=moene.indiv.nluug.nl) by book.moene.indiv.nluug.nl with esmtp (Exim 3.36 #1 (Debian)) id 1C6BSm-0005Dt-00; Sat, 11 Sep 2004 19:15:00 +0200 Message-ID: <41433266.5010908@moene.indiv.nluug.nl> Date: Sat, 11 Sep 2004 17:37:00 -0000 From: Toon Moene Organization: Moene Computational Physics, Maartensdijk, NL User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.6) Gecko/20040414 Debian/1.6-5 MIME-Version: 1.0 To: gcc@gcc.gnu.org CC: "gcc-patches@gcc.gnu.org" Subject: RFC: Remove flags -fmove-all-movables and -freduce-all-givs. Content-Type: multipart/mixed; boundary="------------050603070602090407090001" X-SW-Source: 2004-09/txt/msg00677.txt.bz2 This is a multi-part message in MIME format. --------------050603070602090407090001 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 740 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/ --------------050603070602090407090001 Content-Type: text/plain; name="remflags.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="remflags.patch" Content-length: 5818 2004-09-11 Toon Moene * 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= Make compile reproducible using - 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 ---- --------------050603070602090407090001--