Re: zero-overhead exception handling, -fomit-frame-pointer and other optimizations...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



leon zadorin <leonleon77@xxxxxxxxx> writes:

> Does that mean that now one can have the full effect of
> -fomit-frame-pointer optimization (on architectures which would
> normally allow it without EH cases) -- now with EH as well?

Yes, when using the DWARF unwind information which is now the default,
-fomit-frame-pointer is independent of whether exception handling
works.


> Second question is a bit more in a "ballpark" area -- I would like to
> get a general idea on how "zero-overhead" exception handling actually
> impacts on the various optimizations that a compiler can perform --
> i.e. would there be some quality degradation in the optimized code
> when comparing 2 cases of code (identical to each other, with the
> exception of EH being present).
>
> I know that this is rather dependent on more specific examples, I just
> would like to get a general feel for this -- namely the cases when the
> exception is *not* thrown: whether the "zero-overhead" exception
> implementation would *force* a compiler to *omit* (or somewhat reduce)
> some optimization which it could, otherwise, make use of.

Yes, there are cases where exception handling prevents some compiler
optimizations.  The most obvious is that the compiler can not in
general move instructions across code which might cause an exception.
This inhibits instruction scheduling.  These effects are not usually
very large.  This is true for any compiler--the only compilers which
can implement zero-overhead exceptions are ones which do not do much
optimization.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux