proposal: make -fomit-frame-pointer the default
Michael Matz
matzmich@cs.tu-berlin.de
Fri Apr 14 09:57:00 GMT 2000
Hi,
On Fri, 14 Apr 2000, Thomas R. Truscott wrote:
> The -fomit-frame-pointer option saves time and space,
> and I think it should be on by default.
Then include it in your compile line.
> For a given pc/sp the debugger can determine the current function.
Correct.
> It can "search" from the beginning of the current function
> for an execution path to the given pc.
> This path will indicate any adjustments made to the sp.
> From the adjustments and the given sp it can determine the (virtual)
> frame pointer. Given the complexity of modern debuggers,
> this sort of thing would be relatively trivial.
> Am I missing something?
May be the nontriviality of the task? You would have to build an
instruction interpreter for each target processor. A task in itself, but
not the hard one. Consider (in pseudo code):
push this
if a==1, jump 1
push that
1: do sth useful
if a!=1, jump 2
pop that
2: pop this
I would be very interested in an algorithm, that correctly and trivially
calculates the adjustment to SP on label 1 ;)
Ciao,
Michael.
More information about the Gcc
mailing list