This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: increase in object code size
- To: rth at cygnus dot com
- Subject: Re: increase in object code size
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Sun, 28 Sep 1997 22:38:27 +0100 (BST)
- Cc: jfc at mit dot edu, jbuck at synopsys dot com, egcs at cygnus dot com
> > 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.