Re: Debugging of optimized code

wicklund@Intellistor.COM (Tom Wicklund)
Mon, 30 Jan 1995 17:02:20 GMT

          From comp.compilers

Related articles
[15 earlier articles]
Re: Debugging of optimized code danhicks@aol.com (1995-01-27)
Re: Debugging of optimized code danhicks@aol.com (1995-01-29)
Re: Debugging of optimized code monnier@di.epfl.ch (Stefan Monnier) (1995-01-27)
Re: Debugging of optimized code jqb@netcom.com (1995-02-02)
Debugging of optimized code ssimmons@convex.convex.com (1995-02-02)
Re: Debugging of optimized code copperma@grenoble.rxrc.xerox.com (1995-01-30)
Re: Debugging of optimized code wicklund@Intellistor.COM (1995-01-30)
Re: Debugging of optimized code copperma@grenoble.rxrc.xerox.com (1995-01-30)
Debugging of optimized code cliffc@hpl.hp.com (1995-02-02)
Re: Debugging of optimized code bill@amber.ssd.csd.harris.com (1995-02-01)
Re: Debugging of optimized code monnier@di.epfl.ch (Stefan Monnier) (1995-02-03)
Re: Debugging of optimized code ali@N2.SP.CS.CMU.EDU (Ali-Reza Adl-Tabatabai) (1995-02-03)
Re: Debugging of optimized code bill@amber.ssd.csd.harris.com (1995-02-05)
| List of all articles for this month |

Newsgroups: comp.compilers
From: wicklund@Intellistor.COM (Tom Wicklund)
Keywords: debug, optimize
Organization: Compilers Central
References: 95-01-036 95-01-077
Date: Mon, 30 Jan 1995 17:02:20 GMT

baynes@ukpsshp1.serigate.philips.nl writes:


>... The cost of always providing a frame pointer is small so it
>is reasonable to always do it.


Not really. The cost can be quite high. Not generating a frame
pointer when not needed saved a lot of time when I worked with 80x86
machines in high performance embedded machines (yes, a faster
processor would have been better but would cost too much money).


On a SPARC processor generating a frame pointer is cheap until you
start spilling register windows. It can then become very painful (add
16 loads and stores). Most compilers only skip the frame pointer in
leaf routines (where it isn't too big an issue) but I've seen plenty
of cases where I'd like to see the compiler eliminate a stack frame
(and register window).


Admittedly, for 90% of all code (including the code I'm working with)
I don't care about frame pointers, however for the few percent which
is very time critical one needs every optimization the compiler can
give. This reduces the temptation to move to (less maintanable)
assembly code.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.