This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Optimizations on long long multiply/divide on PowerPC32 don'twork
- From: Linus Torvalds <torvalds at transmeta dot com>
- To: Paul Koning <pkoning at equallogic dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 10 Dec 2001 09:47:51 -0800 (PST)
- Subject: Re: Optimizations on long long multiply/divide on PowerPC32 don'twork
On Mon, 10 Dec 2001, Paul Koning wrote:
>
> Linus> ...Not linking against libgcc has found several problems in gcc.
> Linus> Ranging from missing totally obvious optimizations...
>
> Does that mean that Linux isn't expected to build if you disable
> optimization? That seems strange, considering that debugging with gdb
> is often easier with -O0.
Linux has always required optimizations to build. Since day 1, in fact.
That is partly because I just cannot ever imagine running the code that
gcc outputs without optimizations, but even more because gcc functionality
at -O0 is seriously lacking:
Gcc doesn't support inline functions without optimization (it does in C++,
and it may be that even the C side has started to honour the "inline"
keyword, but I've never been interested enough to check), and Linux has
always tended to prefer inline functions over complicated macros.
I never made "backing" static functions for things like "inb/outb" etc,
that actually expand in the end to just one assembler function.
And I don't know about you, but I debug almost exclusively on a source
level (where compiler optimizations do not matter) or, when I have to, on
an assembler level (where the code is actually _more_ readable with
optimizations). So I'd never use -O0 anyway.
Linus