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]
Other format: [Raw text]

Re: try/finally improvement


Richard Henderson wrote:
Changes try/finally to only use the control-flow-destroying
GOTO_SUBROUTINE_EXPR when there is no other alternative.  We
much prefer to simply re-expand the finally block in all the
places it must be invoked.
The finally block could be a substantial block of code.  So
I assume that re-expanding the finally block is not done when
optimizing for space?

Also, re-expanding the finally block complicates setting breakpoints,
so you probably don't want to do it when compiling with -O0 or -O1.
In principle the descision to re-expand the finally block is
similar to whether to whether to inline functions, and so should
depend on various factors, including the size of the inlined
function (i.e. finally block).

(You've probably thought about these issues; I'm just making sure.)
--
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


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