From owner-freebsd-hackers Sat Jun 7 00:32:18 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA04687 for hackers-outgoing; Sat, 7 Jun 1997 00:32:18 -0700 (PDT) Received: from argus.nuke.net (pm3-p44.tfs.net [206.154.183.236]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA04681 for ; Sat, 7 Jun 1997 00:32:08 -0700 (PDT) Received: (from jbryant@localhost) by argus.nuke.net (8.8.5/8.8.5) id CAA00509; Sat, 7 Jun 1997 02:31:50 -0500 (CDT) From: Jim Bryant Message-Id: <199706070731.CAA00509@argus.nuke.net> Subject: Re: gcc -m486, gcc -O2 To: bde@zeta.org.au (Bruce Evans) Date: Sat, 7 Jun 1997 02:31:45 -0500 (CDT) Cc: freebsd-hackers@freebsd.org Reply-To: jbryant@tfs.net In-Reply-To: <199706062257.IAA18824@godzilla.zeta.org.au> from "Bruce Evans" at Jun 7, 97 08:57:53 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In reply: > >> -O2 is sometimes a pessimization. `-O2 -m486' was suggested in 1994. > >> It is wronger now. > > > >Yes, but in 1994 the kernel was compiled with gcc 2.6.3 or older. > >Now fbsd uses 2.7.2.1 - is the situation still the same with the > >newer compiler? > > Yes, 2.7.2.1 generates essentially the same i386 code as 2.6.3. i generally find that -O2 -m486 -fomit-frame-pointer generates reasonable code, not using frame pointers saves space and a little bit of function call overhead, and i recommend it's use in all except profiling kernels [having a frame pointer might help in debugging]. i haven't recompiled the source under 2.2.2 yet, but up to 2.1.x i found that the above optimizations can be safely used on a make world except for the .o files in /usr/lib [DO NOT ATTEMPT OPTIMIZATIONS ON THOSE!!!], just copy /usr/lib/*.o to a holding area before the makeing /usr/lib, then copy them back after... i would still like to see pentium scheduling and optimizations in the compiler. i think i said this two years ago... jim -- All opinions expressed are mine, if you | "I will not be pushed, stamped, think otherwise, then go jump into turbid | briefed, debriefed, indexed, or radioactive waters and yell WAHOO !!! | numbered!" - #1, "The Prisoner" jbryant@tfs.net - KC5VDJ 2M, 70cm, KPC-3+ - kc5vdj@wv0t.#neks.ks.usa.noam