This is the mail archive of the gcc-patches@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: sjlj-exceptions ICE. simplified test case


On Wed, 26 Apr 2000 08:18:37 -0600, Jeffrey A Law wrote:

  My experience has been that sjlj exceptions bloat things more than the
  tables do.
  
This definately is not true for code with relatively few exception handlers,
which is the case for most Ada programs used in embedded contexts. 

A common approach for exception handling is that handled regions only occur 
at the outer level of an application, where tasks are started and restarted 
if problems occur. The rest of the application has few, if any, handlers.
It is clear that for such programs the setjump/long jump approach is the
cheapest possible approach.

For example, look at compiling cc1 (from gcc-2.95.2) with -O2 on x86 and 
stripping unneeded symbols. The resulting code is 2107580 bytes with
unwind tables, and 1567012 without. So the tables require 34% space. On an
embedded target where programs often need to be squeezed in available flash,
space is at a premium and 30% is enough to make gcc unusable.

  -Geert



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