* Re: Optimizations on long long multiply/divide on PowerPC32 don't
@ 2001-12-11 6:23 dewar
0 siblings, 0 replies; 5+ messages in thread
From: dewar @ 2001-12-11 6:23 UTC (permalink / raw)
To: charlet, guerby; +Cc: gcc, jbuck, pkoning, torvalds
<<If I understand correctly, Inline_Always not inlining at -O0 is
considered a bug. Any available test case or description for the
subtle issues you mention?
>>
Yes, we consider that a bug
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Optimizations on long long multiply/divide on PowerPC32 don't work
@ 2001-12-10 10:23 Linus Torvalds
2001-12-10 11:35 ` Optimizations on long long multiply/divide on PowerPC32 don't Joe Buck
0 siblings, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2001-12-10 10:23 UTC (permalink / raw)
To: Paul Koning; +Cc: gcc
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Optimizations on long long multiply/divide on PowerPC32 don't
2001-12-10 10:23 Optimizations on long long multiply/divide on PowerPC32 don't work Linus Torvalds
@ 2001-12-10 11:35 ` Joe Buck
2001-12-10 13:49 ` guerby
0 siblings, 1 reply; 5+ messages in thread
From: Joe Buck @ 2001-12-10 11:35 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Paul Koning, gcc
Linus writes:
> 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.
No, even in C++ GCC does not inline functions without optimization.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Optimizations on long long multiply/divide on PowerPC32 don't
2001-12-10 11:35 ` Optimizations on long long multiply/divide on PowerPC32 don't Joe Buck
@ 2001-12-10 13:49 ` guerby
2001-12-10 14:08 ` Arnaud Charlet
0 siblings, 1 reply; 5+ messages in thread
From: guerby @ 2001-12-10 13:49 UTC (permalink / raw)
To: jbuck; +Cc: torvalds, pkoning, gcc
> No, even in C++ GCC does not inline functions without optimization.
Same thing for Ada, although a GNAT specific pragma named
Inline_Always exists, my reading of gigi code implies that it still
requires optimizations to be active for the inlining to occur:
gcc/ada/trans.c
<<
static void
process_inlined_subprograms (gnat_node)
Node_Id gnat_node;
{
Entity_Id gnat_entity;
Node_Id gnat_body;
/* If we can inline, generate RTL for all the inlined subprograms.
Define the entity first so we set DECL_EXTERNAL. */
if (optimize > 0 && ! flag_no_inline)
>>
gcc/ada/gnat_rm.texi
<<
@findex Inline_Always
@item pragma Inline_Always
@noindent
Syntax:
@smallexample
pragma Inline_Always (NAME [, NAME]);
@end smallexample
@noindent
Similar to pragma @code{Inline} except that inlining is not subject to
the use of option @code{-gnatn} for inter-unit inlining.
>>
Should I provide a patch to mention explicitely that optimization
needs to be on for inlining to occur with Inline_Always?
--
Laurent Guerby <guerby@acm.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Optimizations on long long multiply/divide on PowerPC32 don't
2001-12-10 13:49 ` guerby
@ 2001-12-10 14:08 ` Arnaud Charlet
2001-12-10 14:31 ` guerby
0 siblings, 1 reply; 5+ messages in thread
From: Arnaud Charlet @ 2001-12-10 14:08 UTC (permalink / raw)
To: guerby; +Cc: jbuck, torvalds, pkoning, gcc
> Same thing for Ada, although a GNAT specific pragma named
> Inline_Always exists, my reading of gigi code implies that it still
> requires optimizations to be active for the inlining to occur:
The front end inlining mechanism is supposed to take care of this. but
there are still some subtle issues that prevent it from working properly.
Anyway, the documentation should not be fixed, since the intent is definitely
to always inline.
Arno
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Optimizations on long long multiply/divide on PowerPC32 don't
2001-12-10 14:08 ` Arnaud Charlet
@ 2001-12-10 14:31 ` guerby
0 siblings, 0 replies; 5+ messages in thread
From: guerby @ 2001-12-10 14:31 UTC (permalink / raw)
To: charlet; +Cc: jbuck, torvalds, pkoning, gcc
> The front end inlining mechanism is supposed to take care of this. but
> there are still some subtle issues that prevent it from working properly.
> Anyway, the documentation should not be fixed, since the intent is definitely
> to always inline.
If I understand correctly, Inline_Always not inlining at -O0 is
considered a bug. Any available test case or description for the
subtle issues you mention?
--
Laurent Guerby <guerby@acm.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-12-11 14:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-11 6:23 Optimizations on long long multiply/divide on PowerPC32 don't dewar
-- strict thread matches above, loose matches on Subject: below --
2001-12-10 10:23 Optimizations on long long multiply/divide on PowerPC32 don't work Linus Torvalds
2001-12-10 11:35 ` Optimizations on long long multiply/divide on PowerPC32 don't Joe Buck
2001-12-10 13:49 ` guerby
2001-12-10 14:08 ` Arnaud Charlet
2001-12-10 14:31 ` guerby
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).