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

Re: increase in object code size


> > 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.


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