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:
No, no difference is done wrt -Os.  When I looked through libjava,
I didn't see any finally block that didn't consist of a single
function call or less, so it didn't seem worth it.
While most finally-s are pretty simple, there may be some that restore
some non-trivial state.  Given that you anyway have to handle the case
that you cannot expand the block twice, it seems reasonable to add a
test for -Os.

Also, re-expanding the finally block complicates setting breakpoints,
so you probably don't want to do it when compiling with -O0 or -O1.
Perhaps.  Ideally the debugger would set multiple "real"
breakpoints in response to the single command.
When gdb can do that and do it without confusing the user,
then we can consider expanding the code multiple times when
compiling with -Oo or -O1.  Until then, I say let's not.

In principal, yes.  Though that decision is affected by the
horribleness that computed gotos have on the control flow.
Substantially worse than indirect unknown function calls and
virtual method calls?  If not, correct debugger semantics
outweighs the cost (until you get to -O2).
--
	--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]