increase in object code size
Joern Rennecke
amylaar@cygnus.co.uk
Sun Sep 28 14:43:00 GMT 1997
> > The first optimization which comes to mind: an exception table entry
> > which does not apply to an instruction which can throw an exception
> > should be eliminated. In GNU C and C++ (and, I think, GNU Ada) only
> > function calls throw exceptions. That means there needs to be at most
> > one table entry per function call.
>
> No, because you will want to support throwing exceptions from
> signal handlers. This is most useful from synchronous signals
> such as SEGV and FPE, but I could also see uses for ALRM.
How about this: make a not too bulky algorithm that can keep track of
the stack pointer through most code. from the start of the function
or from an extra recorded help point. Then the compiler, assembler or
linker checks at compile/link time if this algorithm works for the emitted
code. If it fails somewhere, or it would become too costly to walk
through a long sequence of instructions, an extra help point is inserted
where the stack use is recorded. I think this should allow to save most
of the extra EH information but still allow precision.
More information about the Gcc
mailing list