[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] Re: sibling call optimization
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] Re: sibling call optimization |
Date: |
06 May 2004 11:00:13 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings!
Jim Wilson <address@hidden> writes:
> Camm Maguire wrote:
> > Greetings, and thanks! Any idea why the example file wasn't optimized
> > with -O3 (but with -O2), and/or on some method whereby I can instruct
> > gcc to inform me when the optimization was made?
>
> The example file can't be compiled, so it is imposible to say. All I
> can do is state the obvious, -O3 enables -finline-functions, so
> function inlining must be interferring with sibling call optimizations
> somehow.
>
Thanks! -fno-inline-functions restored the sibling call. Is this
'inline overrides sibling' behavior intentional? Is there any way
that I can write the call itself in a way to prevent inlining in that
instance? I.e. to let the callee be inlined elsewhere, but to prevent
it where I want the sibcall?
> There is apparently no way to tell when the optimization is made.
> Many optimization passes emit a message to the dump file when they
> succeed in doing something, but sibcall.c does not. At the place
> where it sets successful_replacement, we could emit a message to the
> dump file. Or alternatively, we could increment a counter, and print
> the total count after the pass is finished. You could submit a
> bugzilla bug report requesting this feature, or you could try writing
> it yourself.
Thanks! I might take a look at submitting a patch if/when I get a
chance.
I noticed there was a long thread about defining some attribute and/or
warning regarding sibling call optimization a few years ago. I don't
know what the final conclusion was if any. Is the idea of a -Wsibling
coupled with some extension to specify a sibling call in the code off
the table? Its fine if it is, its just that if it isn't, time spent
toward a patch would better be directed in this direction rather than
towards a dump entry, as it is easier for the user to use.
Take care,
> --
> Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
>
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- [Gcl-devel] Re: SLIME, Camm Maguire, 2004/05/03
- Re: [Gcl-devel] Re: SLIME, Eric Merritt, 2004/05/03
- Re: [Gcl-devel] Re: SLIME, Camm Maguire, 2004/05/03
- Re: [Gcl-devel] Re: SLIME, Eric Merritt, 2004/05/03
- [Gcl-devel] sibling call optimization, Camm Maguire, 2004/05/04
- [Gcl-devel] Re: sibling call optimization, Andrew Pinski, 2004/05/04
- Re: [Gcl-devel] Re: sibling call optimization, Camm Maguire, 2004/05/05
- Re: [Gcl-devel] Re: sibling call optimization, Jim Wilson, 2004/05/06
- Re: [Gcl-devel] Re: sibling call optimization,
Camm Maguire <=
- Re: [Gcl-devel] Re: sibling call optimization, Jim Wilson, 2004/05/06
- Re: [Gcl-devel] Re: sibling call optimization, Camm Maguire, 2004/05/07
- Re: [Gcl-devel] Re: sibling call optimization, Jim Wilson, 2004/05/07
- Re: [Gcl-devel] Re: sibling call optimization, Jim Wilson, 2004/05/07
- Re: [Gcl-devel] Re: SLIME, Camm Maguire, 2004/05/06
- Re: [Gcl-devel] Re: SLIME, Eric Merritt, 2004/05/06