[Gcl-devel] Re: sibling call optimization
Jim Wilson
wilson@specifixinc.com
Thu May 6 05:46:00 GMT 2004
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.
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.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list