Re: GCC 3.4 and broken inlining.

From: Robert Hancock
Date: Fri Jul 09 2004 - 22:18:19 EST


If you check the full gcc docs, the -Ox flags only enable omit-frame-pointer
on architectures where debugging is possible without a frame pointer. If you
use the actual -fomit-frame-pointer option, it is always omitted.

----- Original Message -----
From: "Pawel Sikora" <pluto@xxxxxxxxxxxxxxx>
Newsgroups: fa.linux.kernel
To: "Michael Buesch" <mbuesch@xxxxxxxxxx>
Cc: "linux kernel mailing list" <linux-kernel@xxxxxxxxxxxxxxx>
Sent: Friday, July 09, 2004 4:25 AM
Subject: Re: GCC 3.4 and broken inlining.


> On Friday 09 of July 2004 11:43, Michael Buesch wrote:
> > Quoting Andi Kleen <ak@xxxxxx>:
> > > It's too bad that i386 doesn't enable -funit-at-a-time, that improves
> > > the inlining heuristics greatly.
> >
> > From the gcc manpage:
> >
> > -O2 turns on all optimization flags specified by -O. It
> > also turns on the following optimization flags: -fforce-mem
> > -foptimize-sibling-calls -fstrength-reduce -fcse-follow-jumps
> > -fcse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt
> > -fgcse -fgcse-lm -fgcse-sm -fgcse-las -fdelete-null-pointer-checks
> > -fexpensive-optimizations -fregmove -fschedule-insns
> > -fschedule-insns2 -fsched-interblock -fsched-spec -fcaller-saves
> > -fpeephole2 -freorder-blocks -freorder-functions -fstrict-aliasing
> > -funit-at-a-time -falign-functions -falign-jumps -falign-loops
> > ^^^^^^^^^^^^^^^^
> > -falign-labels -fcrossjumping
> >
> > Do I miss something?
>
> # gcc-3.4.1/gcc/opts.c
>
> if (optimize >= 2)
> {
> (...)
> flag_unit_at_a_time = 1;
> }
>
> btw).
>
> I *don't trust* manpages ;)
>
> # man gcc
>
> -fomit-frame-pointer
>
> Don't keep the frame pointer in a register for functions that don't
> need one. This avoids the instructions to save, set up and restore
> frame pointers; it also makes an extra register available in many
> functions. It also makes debugging impossible on some machines.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> (...)
> Enabled at levels -O, -O2, -O3, -Os.
> ^^^^^^^
>
> if (optimize >= 1)
> {
> (...)
> #ifdef CAN_DEBUG_WITHOUT_FP
> flag_omit_frame_pointer = 1;
> #endif
> (...)
>
> finally, at ix86 -O[123s] doesn't turn on -fomit-frame-pointer.
> manpage tells somethine else...
>
> --
> /* Copyright (C) 2003, SCO, Inc. This is valuable Intellectual Property.
*/
>
> #define say(x) lie(x)
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/