This is the mail archive of the gcc-help@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]

function call return path optimization


If function a() calls b() and b() calls c(), gcc recognize that if c() is the last function in b() and optimized a code path that returns to a() directly from c().

This optimization confuses a run time profiler that looks at the current call frame to determine the caller.  So in the above case, inside function c(), it looks like it was called from a().  But from source level, c() is called from b().

Is there a way to turn just that optimization off?  I still need the -O2 option to keep other optimization.

The gcc version I'M using is 3.3 and is on ia64 platform.


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