This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Gcl-devel] Re: sibling call optimization


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]